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

how can i set a date range limit in calendar?

2 Answers 133 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Jingmeng
Top achievements
Rank 1
Jingmeng asked on 19 Oct 2010, 10:26 PM
hey all, my question is about the datepicker on the right top of the calendar, i'd like set up a limitation of that, which not allow user go any further or pick any date out side my set up range, for example, i set up a range which 2000 - 2001, then user cant pick any date over this. how can i achieve this?

best regards

2 Answers, 1 is accepted

Sort by
0
Konstantina
Telerik team
answered on 21 Oct 2010, 10:20 AM
Hi Jingmeng,

Thank you for contacting us.

You can do this in the LayoutUpdated event handler of RadSchduler:

void scheduler_LayoutUpdated(object sender, EventArgs e) 
      
          RadDateTimePicker picker = scheduler.FindChildByType<RadDateTimePicker>(); 
          picker.SelectableDateEnd = new DateTime(2010, 10, 21);
      }
Note, that using FindChildByType method is a perofrmace consuimg task and we do not recommend using it.

If you have any other questions about our controls please let us know.

Regards,
Konstantina
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
0
Jingmeng
Top achievements
Rank 1
answered on 21 Oct 2010, 10:42 PM
thanx Konstantina,
it's working beautiful, but i change LayoutUpdated event handler to Load event handler.

cheers
Tags
Calendar
Asked by
Jingmeng
Top achievements
Rank 1
Answers by
Konstantina
Telerik team
Jingmeng
Top achievements
Rank 1
Share this question
or