How to disable past dates in jQuery datepicker? I was looking for options, but it seems I did not find anything that indicates the possibility of disabling past dates.
UPDATE: Thanks for the quick reply. I tried it with no luck. The days were still not grayed out as I expected, and still accept the selected past date.
I tried this:
$('#datepicker').datepicker({ minDate: '0' });
Does not work.
I tried this:
$('#datepicker').datepicker({ minDate: new Date() });
Still not working.
It displays a calendar widget just fine. It simply will not be gray-haired or prevent the entry of past days. I tried to use minDate and maxDate in the past, and I had no luck, so I decided that it wasnโt them.
javascript jquery date jquery-ui datepicker
netrox Nov 23 '09 at 10:10 2009-11-23 22:10
source share