How to set calendar start/end date?

2 posts, 0 answers
  1. Edward
    Edward avatar
    84 posts
    Member since:
    Feb 2011

    Posted 13 Feb 2012 Link to this post

    I want the calender to display only between certain dates.  I don't want people to flip to 1990s just because they can.

    I don't really see any property to change that, in SchudleView or any of the ViewDefinition.
  2. Georgi
    Georgi avatar
    362 posts

    Posted 16 Feb 2012 Link to this post

    Hello Edward,

    RadScheduleView doesn't have a built-in way to restrict the navigation. However, you can achieve this by handling VisibleRangeChanged event and checking the CurrentDate property.

    Also if you want to set some restriction to the dates in the RadDatePicker,  you can edit the ScheduleView template and modify the following code :

    <telerik:RadDatePicker x:Name="PART_NavigationPicker" Style="{StaticResource NavigationDateTimePickerStyle}" SelectedValue="{Binding CurrentDate, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" DisplayDateStart="02/02/2012"/>

    I've attached a simple project demonstrating both approaches. As an example I have set 02/02/2012 as a start date.

    Don't hesitate to contact us if you have other questions.

    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Back to Top