New to Telerik UI for WinForms? Download free 30-day trial

Selecting Dates

To enable selection of dates set the AllowSelect property to true. Set AllowMultipleSelect to true to enable more than one date at a time.

Selecting with the keyboard

See Keyboard Navigation for a complete list of keys used to navigate RadCalendar.

Selecting with the mouse

Select a single date by clicking on it. If AllowMultipleSelect is true, you can select multiple dates by clicking each date. Then, clicking a selected cell will de-select it.

See the Column and Row Headers topic for how to select entire columns and rows at once.

Selecting using the API

To select a single day assign a DateTime value to the SelectedDate property. To select multiple dates use the SelectedDates.Add() method to add DateTime values to the collection. To have more than one date in the SelectedDates collection you should set the AllowMultipleSelect property to true. The code snippet below shows how to select multiple dates through the API.

Selecting dates

radCalendar1.AllowMultipleSelect = true;
radCalendar1.SelectedDates.Add(new DateTime(2006, 10, 20, 0, 0, 0, 0));
radCalendar1.SelectedDates.Add(new DateTime(2006, 10, 19, 0, 0, 0, 0));
radCalendar1.SelectedDates.Add(new DateTime(2006, 10, 18, 0, 0, 0, 0));

RadCalendar1.AllowMultipleSelect = True
RadCalendar1.SelectedDates.Add(New DateTime(2006, 10, 20, 0, 0, 0, 0))
RadCalendar1.SelectedDates.Add(New DateTime(2006, 10, 19, 0, 0, 0, 0))
RadCalendar1.SelectedDates.Add(New DateTime(2006, 10, 18, 0, 0, 0, 0))

You may also use the SelectedDates.AddRange() method to add an array of DateTime values:

Using the AddRange method

radCalendar1.SelectedDate = new System.DateTime(2007, 9, 17, 0, 0, 0, 0);
radCalendar1.SelectedDates.AddRange(new DateTime[] { new DateTime(2007, 9, 17, 0, 0, 0, 0) });

RadCalendar1.SelectedDate = New Date(2007, 9, 17, 0, 0, 0, 0)
RadCalendar1.SelectedDates.AddRange(New Date() {New Date(2007, 9, 17, 0, 0, 0, 0)})

See Also

In this article