I am having trouble understanding how to set the min/max Date of the jquery Datepicker. When I check the docs, i see that the dateformat
is expected in new Date(2009, 1 - 1, 26)
.
What does the 1-1
mean? When I chec w3c schools for js dateformats, I cannot find this one.
So I tried
$("#datepicker").datepicker({
changeMonth: true,
changeYear: true,
dateFormat: 'yyyy-mm',
minDate: new Date(2001-01),
maxDate: '+15Y'
});
But that leaves me with completely random results... It starts 2006 and ends 2026.
Here is fiddle http://jsfiddle.net/ANF2y/58/