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

2 posts, 1 answers
  1. Peytton
    Peytton avatar
    5 posts
    Member since:
    Oct 2015

    Posted 21 Oct 2015 Link to this post

    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

     

  2. Answer
    Vasil
    Admin
    Vasil avatar
    1547 posts

    Posted 26 Oct 2015 Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top