jquery-calendrical
jquery-calendrical copied to clipboard
Call to formatDate has wrong parameters for usa format option
When including the option for usa date format, the date range seems to break on the end date. This is do to the fact that the plugin is calling formatDate on line 382 with the wrong parameters.
This:
if (endDate >= selected) {
options.endDate.val(formatDate(
new Date(
date.getTime() +
endDate.getTime() -
selected.getTime()
),
options.usa,
options.separator
));
}
Should be:
if (endDate >= selected) {
options.endDate.val(formatDate(
new Date(
date.getTime() +
endDate.getTime() -
selected.getTime()
),
options
));
}
I have this fixed my fork, and submitted pull request #21, but so far the maintainer hasn't pulled in the changes.