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

Allow Date Range Selection Only

3 Answers 94 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Brendan Enrick
Top achievements
Rank 1
Brendan Enrick asked on 28 Sep 2009, 03:41 PM
Hello,

I am using the calendar control and want my users to select a date range. In other words I want them to be able to click and drag or use the shift selection to select a date range. I've got this working for me. However, I want to disable the ability to Ctrl click and select individual (non-range) sets of dates.

This image should help explain what I am looking for. It shows what I want to allow in the calendar and what I do not want to allow.
http://img16.imageshack.us/img16/7870/telerikcalendardatesele.png

Thanks,
Brendan

3 Answers, 1 is accepted

Sort by
0
Kaloyan
Telerik team
answered on 30 Sep 2009, 03:56 PM
Hi Brendan Enrick,

It is not possible to achieve this with the current version of the RadCalendar. We will consider it as a feature request and we will try to add it in one of our forthcoming releases of the control. If you have any other questions don't hesitate to contact us.

Best wishes,
Kaloyan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Jeff
Top achievements
Rank 1
answered on 08 Dec 2010, 02:58 PM
Any word on support for disabling the Ctrl+Click selection from the Multiple select mode?
0
Kaloyan
Telerik team
answered on 10 Dec 2010, 09:33 AM
Hi Jeff,

We will consider adding such a feature to the control capability. As for now try the following code in your project when a SeletionChanged event is thrown from the RadCalendar:

private void RadCalendar_SelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangedEventArgs e)
        {
            var isCtrlPreseed = (Keyboard.Modifiers & ModifierKeys.Control) == ModifierKeys.Control;
            if (isCtrlPreseed && calendar.SelectedDates.Count > 0)
            {
                Dispatcher.BeginInvoke(() => calendar.SelectedDates.Clear());
            }
        }


Kind regards,
Kaloyan
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
Tags
Calendar
Asked by
Brendan Enrick
Top achievements
Rank 1
Answers by
Kaloyan
Telerik team
Jeff
Top achievements
Rank 1
Share this question
or