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

raddatepicker - maxiumum date today

1 Answer 295 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
andieje
Top achievements
Rank 1
andieje asked on 11 Mar 2008, 01:23 AM
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

1 Answer, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 11 Mar 2008, 11:53 AM
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
Tags
Calendar
Asked by
andieje
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
Share this question
or