Strange one, I’m trying to specify a min date with no weekends – trouble is when I specify the min date as 2012, 10, 29 – the picker seems to default to November and doesn’t let me scroll back to october! Ive created a fiddle here: http://jsfiddle.net/sN63A/ to demonstrate the problem!
If I specify “9” instead of “10” for the month attribute it does show october but this makes me a little uneasy as I’d like to know at least why it doesn’t work as expected!
I’m simply doing this for the fiddle http://jsfiddle.net/sN63A/ :
<input id="pickDate" type="text" />
$('#pickDate').datepicker({
dateFormat: "dd/mm/yy",
beforeShowDay: $.datepicker.noWeekends,
minDate: new Date(2012, 10, 29, 0, 0, 0, 1)
});
Months starts with Jan = 0;Feb =1;mar=2.So if
2012, 10, 29is given, it would default to November which is normal behavior.Min Date in this case would mean that you are not allowed to go back before October.
Check here