开发者

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());
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜