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

How to set a minimum date of today, while still allowing a date in the past to show

I'm trying to use an SfDatePicker control, and I'm running into a problem.  I have a date that I want to display in my application, and sometimes that date will be in the past.  If the user clicks on the date picker control to change it, I want to force the user to only be able to select a new date that is either today or in the future.  If they click away from the control without saving it, it should keep the old (past) date.  The problem I run into currently is that when I set the MinDate property to today, it also changes the current value being displayed to today (if it was previously in the past).  Is there a way to do this?  Thanks.

2 Replies

CF Cameron Flores November 12, 2015 08:11 PM UTC

Nevermind - I switched to a calendar control, which works better for what I'm trying to do.


VJ Victory Jessie Selvam D Syncfusion Team November 13, 2015 10:53 AM UTC

Hi Cameron,

We are happy to hear that you have resolved it.

We would like to inform you that, it is the default behaviour in SfDatePicker control. It will reset the value to MinDate if the selected date doesn't fall in between range values.

Please let us know if you have any query.

Regards,
Jessie

Loader.
Up arrow icon