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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Max Date on a DateTimePicker

Thread ID:

Created:

Updated:

Platform:

Replies:

124582 Jun 15,2016 02:16 PM UTC Jun 16,2016 12:00 PM UTC JavaScript 1
loading
Tags: ejDateTimePicker
Robert David
Asked On June 15, 2016 02:16 PM UTC

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

Francis Paul Antony Raj [Syncfusion]
Replied On 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 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;