I'm using jQuery's date-picker and specifying a minimum date of today and maximum date of Jan 31st. When the calendar shows up, however, the 31st cannot be selected, despite the code looking correct.
Here's the code:
function initializePickers() {
jQuery('.date-start').each(function() {
startEndPickers(this);
});
jQuery('.date-end').each(function() {
startEndPickers(this);
});
}
function startEndPickers(input) {
jQuery(input).datepicker({
dateFormat: "M dd, yy",
minDate: new Date(),
maxDate: new Date('2014-01-31')
});
}
And here is a jsFiddle which demonstrates the inability to pick January 31st: http://jsfiddle.net/Hec5m/
Anyone know what's causing this? The maxDate
is clearly specified as the 31st, not the 30th.