Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
101
rated 0 times [  103] [ 2]  / answers: 1 / hits: 153216  / 13 Years ago, fri, october 28, 2011, 12:00:00

I would like to set today's date as a maxdate for jQuery datepicker in order to prevent users from picking date greater than today's date


More From » jquery

 Answers
135
$(.datepicker).datepicker({maxDate: '0'});


This will set the maxDate to +0 days from the current date (i.e. today). See:



http://api.jqueryui.com/datepicker/#option-maxDate


[#89388] Thursday, October 27, 2011, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
kentrelle

Total Points: 333
Total Questions: 93
Total Answers: 95

Location: Vietnam
Member since Sun, Oct 18, 2020
4 Years ago
kentrelle questions
;