raddatepicker - maxiumum date today

2 posts, 0 answers
  1. andieje
    andieje avatar
    473 posts
    Member since:
    Oct 2006

    Posted 10 Mar 2008 Link to this post

    Hi

    How would i set up a rad date picker so that the maximum date the user can enter is today's date. Ideally i would like the calendar control to prevent the user from navigating to any days after today. For example on a calendar for today, March 11th, all the days after march 11th would be greyed out and the next month button would be disabled. I would also like it if the user typed a date after today the date is shown in red in the textbox.

    thanks very much
    andrea
  2. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 11 Mar 2008 Link to this post

    Hi andieje,

    You can use the MaxDate/MinDate properties to specify the valid range for the date-picker. If you do not want a date after today to be selectable you can set the MaxDate to Today:

    RadDatePicker1.MaxDate = DateTime.Today;

    RadDatePicker Prometheus automatically applies red color to the incorrect and the out of range dates, typed in the input.
     
    Sincerely yours,
    Maria Ilieva
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top