how can i set a date range limit in calendar?

3 posts, 0 answers
  1. Jingmeng
    Jingmeng avatar
    18 posts
    Member since:
    Jun 2010

    Posted 19 Oct 2010 Link to this post

    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. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 21 Oct 2010 Link to this post

    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
  3. DevCraft banner
  4. Jingmeng
    Jingmeng avatar
    18 posts
    Member since:
    Jun 2010

    Posted 21 Oct 2010 Link to this post

    thanx Konstantina,
    it's working beautiful, but i change LayoutUpdated event handler to Load event handler.

    cheers
Back to Top