jQuery: restricting the datepicker
i couldn't figure out on how to do this (using minDate): by default i want my datepicker only allowing to pick dates >= today.
how wou开发者_StackOverflowld this work?
thx
Use the minDate:0
option in the call to datepicker.
This will only allow you to select a date in the next 30 days:
jQuery("#date_field").datepicker({
minDate: 0,
maxDate: 30
});
See the documentation on the minDate option
I got this from here..
Try
$('.selector').datepicker('option', 'minDate', new Date());
精彩评论