This is a migrated thread and some comments may be shown as answers.
How to set calendar start/end date?
1 Answer 33 Views
This is a migrated thread and some comments may be shown as answers.
Edward
Top achievements
Rank 1
Edward asked on 13 Feb 2012, 04:49 PM
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.

1 Answer, 1 is accepted

Sort by
0
Georgi
Telerik team
answered on 16 Feb 2012, 01:27 PM
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.

Regards,
Georgi
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Asked by
Edward
Top achievements
Rank 1
Answers by
Georgi
Telerik team
Share this question
or