This is a migrated thread and some comments may be shown as answers.

As validate the MinDate equal to 6 months before the current date current date

1 Answer 46 Views
DatePicker
This is a migrated thread and some comments may be shown as answers.
Peytton
Top achievements
Rank 1
Peytton asked on 21 Oct 2015, 05:37 AM

I need to validate that the minimum date to select is equal to 6 months before the current date.
For example: Today's date = 21.10.2015
this.dt_Date.MaxDate = DateTime.Now; so
MinDate = 04.21.2015

 

1 Answer, 1 is accepted

Sort by
0
Accepted
Vasil
Telerik team
answered on 26 Oct 2015, 06:45 AM
Hi Isabel,

In C# you can use this approach:
MinDate = DateTime.Now.AddMonths(-6);

Regards,
Vasil
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
DatePicker
Asked by
Peytton
Top achievements
Rank 1
Answers by
Vasil
Telerik team
Share this question
or