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

Selecting date range with RadDatePicker?

1 Answer 945 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Martin Sherene
Top achievements
Rank 1
Martin Sherene asked on 30 Oct 2013, 02:02 PM
Is it possible to enable date range selection within the RadDatePicker control by setting the Calendar-RangeSelectionMode property to either ConsecutiveClicks or OnKeyHold?  I was hoping for a sort of "out of the box" functionality, without the need for additional client-side scripting.  I know I can enable this functionality by using the RadCalendar control, which would cause the calendar to permanently display on the page, however I like the associated [format friendly] input field of the RadDatePicker along with the optional RadCalendar popup; however when using the following code, upon selecting my first/"start" date, the calendar dialog closes before I am able to select my second/"end" date.

<telerik:RadDatePicker runat="server" ID="MyDatePicker" Calendar-RangeSelectionMode="ConsecutiveClicks" />


Thanks,

Martin

1 Answer, 1 is accepted

Sort by
0
Viktor Tachev
Telerik team
answered on 04 Nov 2013, 12:24 PM
Hello Martin,

Thank you for contacting Telerik support.

The RadDatePicker control is intended to select only one date from the Calendar. If you would like to have date range there are couple of options.

The first option is to use two RadDatePicker controls - one for start date and one for end date. Similar approach is illustrated in this online demo.

Another approach would be to use RadCalendar control placed in a popup container. This way the RadCalendar will not be always visible on the page.

I hope this information would be helpful to you.

Regards,
Viktor Tachev
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Calendar
Asked by
Martin Sherene
Top achievements
Rank 1
Answers by
Viktor Tachev
Telerik team
Share this question
or