Disable future dates in jQuery UI Datepicker
问题 Is it possible to disable future date from today? Let say today is 23/10/2010, so 24/10/2010 onwards are disabled. Sorry I am very new in jQuery and JavaScript. 回答1: Yes, indeed. The datepicker has the maxdate property that you can set when you initialize it. Here's the codez $("#datepicker").datepicker({ maxDate: new Date, minDate: new Date(2007, 6, 12) }); 回答2: $(function() { $("#datepicker").datepicker({ maxDate: '0'}); }); 回答3: Try This: $('#datepicker').datepicker({ endDate: new Date() }