How to disable past date from ej-date-picker?

How to disable past date from ej-date-picker? if we don't need previous dates. we need only current and upcoming dates. what is the best solution?

1 Reply

DL Deepa Loganathan Syncfusion Team September 13, 2018 05:20 AM UTC

Hi Kapil, 

 

Thanks for contacting Syncfusion Support. 

 

You can use the minDate property of the DatePicker to enable the date values only from today’s date while disabling the previous dates as shown in the below code snippet. 

 

 

<ej-date-picker id="datepicker" min-date="@DateTime.Today"></ej-date-picker> 

 

Please check the below documentation to know more about minDate property of the DatePicker component. 

 

UG Documentation : https://help.syncfusion.com/aspnet-core/datepicker/behavior-settings#date-range  

 

For your convenience, we have attached a simple sample in the below link.  

Link: http://www.syncfusion.com/downloads/support/forum/139765/ze/DatePicker_Core-1288637169  

 

Please let us know if you need any further assistance. 

                                                                                                                                             

Regards, 

Deepa L.

Loader.
Up arrow icon