We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Max Date on a DateTimePicker

Hello I'm trying to set the Max Date value on a date time picker- Is it possible to set the date to the last day of 9999? Currently it seems the max date is capped at the last day of 2099

Ive thrown together a quick example of what I am attempting.
http://jsplayground.syncfusion.com/igrs3f0a

1 Reply

FP Francis Paul Antony Raj Syncfusion Team June 16, 2016 12:00 PM UTC

Hi Robert, 
 
Thanks for contacting Syncfusion support. 
 
Yes, it is possible to set the desired date time as a maximum date time value in the DateTimePicker control. You can achieve this requirement using “maxDateTime” Property. Please refer to the below code snippet. 
 
[html] 
<input type="text" id="datetime" /> 
 
[script] 
$("#datetime").ejDateTimePicker({ value: date, dateTimeFormat: "d/M/yyyy tt h:mm:ss", maxDateTime: new Date("12/31/9999 12:00:00 PM") }); 
We have modified the provided sample in the below JSPlayground link. 
 
For more information about properties, methods, events in DateTimePicker, please refer to, 
 
Please revert if you need any further assistance. 
 
Regards, 
Francis Paul A 


Loader.
Live Chat Icon For mobile
Up arrow icon