Key Properties
The purpose of this help article is to show you the key properties of the RadCalendar
control. The topic includes the following sections:
Selection Properties
-
SelectionMode
—This property defines how many dates can be selected at once. The possible values areSingle
,Extended
andMultiple
. The default value isSingle
.
-
SelectedDate
—Gets or sets the currently selected date. If the SelectionMode is set to Multiple or Extended, returns the first date from the SelectedDates. -
SelectedDates
—Gets the currently selected dates. Useful when the SelectionMode is set to Multiple or Extended.
-
SelectableDateStart
—Gets or sets the first date that can be selected. -
SelectableDateEnd
—Gets of sets the last date that can be selected. -
BlackoutDates
—Gets or sets a collection of dates that cannot be selected.
Setting the Current Display Date
The DisplayDate
property allows you to set the current visible date. This is the date which will be displayed when you show the calendar.
Setting DisplayDate
<telerik:RadCalendar DisplayDate="4/1/2018"/>
DisplayDate is different from SelectedDate. The DisplayDate points out just the default month and year visible when the calendar first pops up.
Styling the Different Views
You can apply a style to the different modes through the following properties:
-
MonthViewStyle
—Gets or sets the style for the month calendar view. -
YearViewStyle
—Gets or sets the style for the year calendar view. -
DecadeViewStyle
—Gets or sets the style for the decade calendar view. -
CenturyViewStyle
—Gets or sets the style for the century calendar view.
Formatting the Headers
You can apply a string format to the header of the different views through the following properties:
-
MonthViewHeaderFormat
—Gets or sets the format for the header of the month view of the calendar. -
DecadeViewHeaderFormat
—Gets or sets the format for the header of the decade view of the calendar. -
YearViewHeaderFormat
—Gets or sets the format for the header of the year view of the calendar. -
CenturyViewHeaderFormat
—Gets or sets the format for the header of the century view of the calendar.
Setting MonthViewHeaderFormat
<telerik:RadCalendar MonthViewHeaderFormat="MMMM" />
Check out the Custom date and time format strings article to learn about the possible format strings.
Controling the MoveRight and MoveLeft Buttons Visibility
-
PreviousButtonVisibility
—Gets or sets the visibility of the MoveLeft button. -
NextButtonVisibility
—Gets or sets the visibility of the MoveRight button.
Controling the Highlighting of the Today's Date
The IsTodayHighlighted
property allows you to control if the today's date is highlighted. Its default value is true. Setting this property to false will remove the highlight border that is displayed on today's date.
Removing the highlight of today's date
<telerik:RadCalendar IsTodayHighlighted="False"/>