Click or drag to resize
RadCalendar Class
Represents a selection control that allows you to select dates from a calendar.
Inheritance Hierarchy

Namespace: Telerik.Windows.Controls
Assembly: Telerik.Windows.Controls.Input (in Telerik.Windows.Controls.Input.dll) Version: 2017.3.913.40 (2017.3.913.40)
Syntax
public class RadCalendar : Control, 
	IThemable

The RadCalendar type exposes the following members.

Constructors
  NameDescription
Public methodRadCalendar
Initializes a new instance of the RadCalendar class.
Top
Methods
  NameDescription
Public methodStatic memberIsDisplayDateEndValid
Checks whether the date is a valid DisplayDateEnd value for the given calendar.
Public methodStatic memberIsDisplayDateStartValid
Checks whether the date is a valid DisplayDateStart value for the given calendar.
Public methodStatic memberIsDisplayDateValid
Checks whether the given date is a valid display date for the calendar.
Public methodStatic memberIsSelectableDateEndValid
Checks whether the date is a valid SelectableDateEnd value for the given calendar.
Public methodStatic memberIsSelectableDateStartValid
Checks whether the date is a valid SelectableDateStart value for the given calendar.
Public methodOnApplyTemplate
When overridden in a derived class, is invoked whenever application code or internal processes call ApplyTemplate.
(Overrides FrameworkElementOnApplyTemplate.)
Protected methodOnBlackOutDatesChanged
Called when BlackoutDates collection changed.
Protected methodOnCreateAutomationPeer
Returns class-specific System.Windows.Automation.Peers.AutomationPeer implementations for the Windows Presentation Foundation (WPF) infrastructure.
(Overrides UIElementOnCreateAutomationPeer.)
Protected methodOnDisplayDateChanged
The OnDisplayDateChanged is called when the display date of the calendar changes.
Protected methodOnDisplayModeChanged
OnDisplayModeChanged is called when the display mode of the calendar changes.
Protected methodOnGotFocus
Called before the System.Windows.UIElement.GotFocus event occurs.
(Overrides FrameworkElementOnGotFocus(RoutedEventArgs).)
Protected methodOnInitialized
Raises the Initialized event. This method is invoked whenever IsInitialized is set to true internally.
(Overrides FrameworkElementOnInitialized(EventArgs).)
Protected methodOnKeyDown
Called before the KeyDown event occurs.
(Overrides UIElementOnKeyDown(KeyEventArgs).)
Protected methodOnMouseLeave
Called before the MouseLeave event occurs.
(Overrides UIElementOnMouseLeave(MouseEventArgs).)
Protected methodOnMouseLeftButtonDown
Called before the MouseLeftButtonDown event occurs.
(Overrides UIElementOnMouseLeftButtonDown(MouseButtonEventArgs).)
Protected methodOnSelectionChanged
OnSelectionChanged is called whenever the selected dates of the calendar change.
Protected methodOnSelectionModeChanged
Called when SelectionMode changed.
Public methodResetTheme
Resets the theme.
Top
Extension Methods
  NameDescription
Public Extension MethodChildrenOfTypeT
Gets all child elements recursively from the visual tree by given type.
(Defined by ChildrenOfTypeExtensions.)
Public Extension MethodClearIfNoBindingAndSet
Clears if set.
(Defined by CommonExtensions.)
Public Extension MethodClearIfSet
Clears the property if a value has been set.
(Defined by CommonExtensions.)
Public Extension MethodDeserializePrimitives
Deserializes some primitive properties of a control.
(Defined by SerializationExtensions.)
Public Extension MethodEnableLayoutRounding (Defined by LayoutRoundingHelperExtensions.)
Public Extension MethodFindChildByTypeT
Finds child element of the specified type. Uses breadth-first search.
(Defined by ChildrenOfTypeExtensions.)
Public Extension MethodGetAssociatedInlineUIContainer (Defined by ExtensionMethods.)
Public Extension MethodGetAssociatedLayoutBox (Defined by ExtensionMethods.)
Public Extension MethodGetBaseControlItemStatus
Gets a string that communicates the visual status of a Control.
(Defined by AutomationExtensions.)
Public Extension MethodGetBoundsRelativeTo
Gets the bounds relative to the current framework element.
(Defined by ExtensionMethods.)
Public Extension MethodGetGlobalMousePosition
(Defined by WindowHost.)
Public Extension MethodGetParents
Enumerates through element's parents in the visual tree.
(Defined by ParentOfTypeExtensions.)
Public Extension MethodGetVisualParentT
Searches up in the visual tree for parent element of the specified type.
(Defined by ParentOfTypeExtensions.)
Public Extension MethodIsAncestorOf(DependencyObject)Overloaded.
Determines whether the element is ancestor of the current UI element.
(Defined by ExtensionMethods.)
Public Extension MethodIsAncestorOf(DependencyObject)Overloaded.
Determines whether the element is an ancestor of the descendant.
(Defined by ParentOfTypeExtensions.)
Public Extension MethodIsKeyboardFocusWithin
Determines whether keyboard focus is within the current UI element.
(Defined by KeyboardHelper.)
Public Extension MethodIsLocalValueSet(DependencyProperty)Overloaded.
Determines whether the specified dependency property local value is set.
(Defined by DependencyObjectExtensions.)
Public Extension MethodIsLocalValueSet(DependencyProperty)Overloaded.
Determines whether the specified dependency property local value is set.
(Defined by CommonExtensions.)
Public Extension MethodParentOfTypeT
Gets the parent element from the visual tree by given type.
(Defined by ParentOfTypeExtensions.)
Public Extension MethodSerializePrimitives
Serializes some primitive properties of a control.
(Defined by SerializationExtensions.)
Public Extension MethodSetAssociatedLayoutBox (Defined by ExtensionMethods.)
Public Extension MethodSetIfDifferent
Sets the value of the dependencyProperty property if it's hasn't that value currently.
(Defined by CommonExtensions.)
Public Extension MethodSetLayout
Sets the location in the element in Canvas.
(Defined by CommonExtensions.)
Public Extension MethodSetLocation(Point)Overloaded.
Sets the location in the element in Canvas.
(Defined by CommonExtensions.)
Public Extension MethodSetLocation(Double, Double)Overloaded.
Sets the location in the element in Canvas.
(Defined by CommonExtensions.)
Public Extension MethodSlideInOverloaded.
Slides the given element into view. This is an extension method.
(Defined by CalendarAnimation.)
Public Extension MethodSlideIn(TimeSpan)Overloaded.
Slides the given element into view. This is an extension method.
(Defined by CalendarAnimation.)
Public Extension MethodSlideOutOverloaded.
Slides the given element out of view. This is an extension method.
(Defined by CalendarAnimation.)
Public Extension MethodSlideOut(TimeSpan)Overloaded.
Slides the given element out of view. This is an extension method.
(Defined by CalendarAnimation.)
Public Extension MethodTranslate(NullableDouble, NullableDouble, NullableDouble, NullableDouble, TimeSpan)Overloaded.
Translates the target element as requested by the parameters.
(Defined by CalendarAnimation.)
Public Extension MethodTranslate(NullableDouble, NullableDouble, NullableDouble, NullableDouble, TimeSpan, Action)Overloaded.
Translates the target element as requested by the parameters and executes the action request.
(Defined by CalendarAnimation.)
Top
Fields
  NameDescription
Public fieldStatic memberAreWeekNamesVisibleProperty
Identifies the property.
Public fieldStatic memberAreWeekNumbersVisibleProperty
Identifies the property.
Public fieldStatic memberBlackoutDatesProperty
Identifies the property.
Public fieldStatic memberCalendarWeekRuleProperty
Identifies the property.
Public fieldStatic memberCenturyViewHeaderFormatProperty
Identifies the property.
Public fieldStatic memberCenturyViewPanelProperty
Identifies the property.
Public fieldStatic memberCenturyViewStyleProperty
Identifies the property.
Public fieldStatic memberColumnsProperty
Identifies the property.
Public fieldStatic memberCultureProperty
Identifies the property.
Public fieldStatic memberDateSelectionModeProperty
Identifies the property.
Public fieldStatic memberDayButtonStyleProperty
Identifies the property.
Public fieldStatic memberDayButtonStyleSelectorProperty
Identifies the property.
Public fieldStatic memberDayTemplateProperty
Identifies the property.
Public fieldStatic memberDayTemplateSelectorProperty
Identifies the property.
Public fieldStatic memberDecadeButtonStyleProperty
Identifies the property.
Public fieldStatic memberDecadeButtonStyleSelectorProperty
Identifies the property.
Public fieldStatic memberDecadeTemplateProperty
Identifies the property.
Public fieldStatic memberDecadeTemplateSelectorProperty
Identifies the property.
Public fieldStatic memberDecadeViewHeaderFormatProperty
Identifies the property.
Public fieldStatic memberDecadeViewPanelProperty
Identifies the property.
Public fieldStatic memberDecadeViewStyleProperty
Identifies the property.
Public fieldStatic memberDisplayDateChangedEvent
Identifies the Event.
Public fieldStatic memberDisplayDateEndProperty
Identifies the Property.
Public fieldStatic memberDisplayDateProperty
Identifies the property.
Public fieldStatic memberDisplayDateStartProperty
Identifies the .
Public fieldStatic memberDisplayModeChangedEvent
Identifies the Event.
Public fieldStatic memberDisplayModeProperty
Identifies the Property.
Public fieldStatic memberFirstDayOfWeekProperty
Identifies the property.
Public fieldStatic memberHeaderVisibilityProperty
Identifies the property.
Public fieldStatic memberIsReadOnlyProperty
Identifies the property.
Public fieldStatic memberIsTodayHighlightedProperty
Identifies the dependency property.
Public fieldStatic memberMaxDate
Gets the latest date that the calendar can display.
Public fieldStatic memberMinDate
Gets the earliest date that the calendar can display.
Public fieldStatic memberMonthButtonStyleProperty
Identifies the property.
Public fieldStatic memberMonthButtonStyleSelectorProperty
Identifies the property.
Public fieldStatic memberMonthTemplateProperty
Identifies the property.
Public fieldStatic memberMonthTemplateSelectorProperty
Identifies the property.
Public fieldStatic memberMonthViewHeaderFormatProperty
Identifies the property.
Public fieldStatic memberMonthViewPanelProperty
Identifies the property.
Public fieldStatic memberMonthViewStyleProperty
Identifies the property.
Public fieldStatic memberOrientationProperty
Identifies the property.
Public fieldStatic memberRowsProperty
Identifies the property.
Public fieldStatic memberSelectableDateEndProperty
Identifies the property.
Public fieldStatic memberSelectableDateStartProperty
Identifies the dependency property.
Public fieldStatic memberSelectedDateProperty
Identifies the dependency property.
Public fieldStatic memberSelectionChangedEvent
Identifies the Event.
Public fieldStatic memberSelectionModeProperty
Identifies the dependency property.
Public fieldStatic memberUseShortestDayNamesProperty
Identifies the property. The value that indicates whether the week names buttons are using shortest day names. It's used in office 2013 theme.
Public fieldStatic memberViewsHeaderVisibilityProperty
Identifies the property.
Public fieldStatic memberYearButtonStyleProperty
Identifies the property.
Public fieldStatic memberYearButtonStyleSelectorProperty
Identifies the property.
Public fieldStatic memberYearTemplateProperty
Identifies the property.
Public fieldStatic memberYearTemplateSelectorProperty
Identifies the property.
Public fieldStatic memberYearViewHeaderFormatProperty
Identifies the property.
Public fieldStatic memberYearViewPanelProperty
Identifies the property.
Public fieldStatic memberYearViewStyleProperty
Identifies the property.
Top
Properties
  NameDescription
Public propertyAreWeekNamesVisible
Gets or sets whether WeekNames will be displayed.
Public propertyAreWeekNumbersVisible
Gets or sets whether WeekNumbers will be displayed.
Public propertyBlackoutDates
Gets or sets a list of dates that cannot be selected. This is a dependency property.
Public propertyCalendarWeekRule
Gets or sets how should the first week in the year be counted. This is a dependency property.
Public propertyCenturyViewHeaderFormat
Gets or sets the format for the header of the century views of the calendar. This is a dependency property.
Public propertyCenturyViewPanel
Gets or sets the items panel template for the century views of the calendar. This is a dependency property.
Public propertyCenturyViewStyle
Gets or sets the style of the century calendar view. This is a dependency property.
Public propertyColumns
Gets or sets the number of columns of calendar views in the calendar. This is a dependency property.
Public propertyCulture
Gets or sets the culture that the Calendar uses. This is a dependency property.
Public propertyDateSelectionMode
Gets or sets DateSelectionMode property. This is a dependency property.
Public propertyDayButtonStyle
Gets or sets the style for the day buttons in the month views of the calendar. This is a dependency property.
Public propertyDayButtonStyleSelector
Gets or sets the style selector for the day buttons in the month views of the Calendar.
Public propertyDayTemplate
Gets or sets the content templates for the day buttons in the month views of the calendar. This is a dependency property.
Public propertyDayTemplateSelector
Gets or sets the DataTemplate selectors for the day buttons in the month views of the calendar. This is a dependency property.
Public propertyDecadeButtonStyle
Gets or sets the style for the year decade in the century views of the calendar. This is a dependency property.
Public propertyDecadeButtonStyleSelector
Gets or sets the style selector for the decade buttons in the century views of the Calendar.
Public propertyDecadeTemplate
Gets or sets the content templates for the decade buttons in the century views of the calendar. This is a dependency property.
Public propertyDecadeTemplateSelector
Gets or sets the DataTemplate selectors for the decade buttons in the century views of the calendar. This is a dependency property.
Public propertyDecadeViewHeaderFormat
Gets or sets the format for the header of the decade views of the calendar. This is a dependency property.
Public propertyDecadeViewPanel
Gets or sets the items panel template for the decade views of the calendar. This is a dependency property.
Public propertyDecadeViewStyle
Gets or sets the style of the decade calendar view. This is a dependency property.
Public propertyDisplayDate
Gets or sets the current date to display. This is a dependency property.
Public propertyDisplayDateEnd
Gets or sets the last date that would be able to be displayed. This is a dependency property.
Public propertyDisplayDateStart
Gets or sets the first date that would be able to be displayed. This is a dependency property.
Public propertyDisplayMode
Gets or sets the display mode of the Calendar. This is a dependency property.
Public propertyFirstDayOfWeek
Gets or sets the day that is considered the beginning of the week.
Public propertyHeaderVisibility
Gets or sets the visibility of the Calendar's header. This is a dependency property.
Public propertyIsReadOnly
Gets or sets whether the Calendar's selection can be changed. This is a dependency property.
Public propertyIsTodayHighlighted
Gets or sets whether the today date would be highlighted. This is a dependency property.
Public propertyMonthButtonStyle
Gets or sets the style for the month buttons in the year views of the calendar. This is a dependency property.
Public propertyMonthButtonStyleSelector
Gets or sets the style selector for the month buttons in the year views of the Calendar.
Public propertyMonthTemplate
Gets or sets the content templates for the month buttons in the year views of the calendar. This is a dependency property.
Public propertyMonthTemplateSelector
Gets or sets the DataTemplate selectors for the month buttons in the year views of the calendar. This is a dependency property.
Public propertyMonthViewHeaderFormat
Gets or sets the format for the header of the month views of the calendar. This is a dependency property.
Public propertyMonthViewPanel
Gets or sets the items panel template for the month views of the calendar. This is a dependency property.
Public propertyMonthViewStyle
Gets or sets the style of the month calendar view. This is a dependency property.
Public propertyOrientation
Gets or sets whether the orientation of the Calendar. This is a dependency property.
Public propertyRows
Gets or sets the number of rows of calendar views in the calendar. This is a dependency property.
Public propertySelectableDateEnd
Gets or sets the last date that can be selected. This is a dependency property.
Public propertySelectableDateStart
Gets or sets the first date that can be selected. This is a dependency property.
Public propertySelectedDate
Gets or sets the currently selected date. This is a dependency property.
Public propertySelectedDates
Gets an list of the currently selected dates.
Public propertySelectionMode
Gets or sets the types of selection that would be allowed in the Calendar. This is a dependency property.
Public propertyUseShortestDayNames
Gets or sets UseShortestDayNames property. This is a dependency property.
Public propertyViewsHeaderVisibility
Gets or sets the visibility of the header of the calendar views (month, year, decade, century). This is a dependency property.
Public propertyYearButtonStyle
Gets or sets the style for the year buttons in the decade views of the calendar. This is a dependency property.
Public propertyYearButtonStyleSelector
Gets or sets the style selector for the year buttons in the decade views of the Calendar.
Public propertyYearTemplate
Gets or sets the content templates for the year buttons in the decade views of the calendar. This is a dependency property.
Public propertyYearTemplateSelector
Gets or sets the DataTemplate selectors for the year buttons in the decade views of the calendar. This is a dependency property.
Public propertyYearViewHeaderFormat
Gets or sets the format for the header of the year views of the calendar. This is a dependency property.
Public propertyYearViewPanel
Gets or sets the items panel template for the year views of the calendar. This is a dependency property.
Public propertyYearViewStyle
Gets or sets the style of the calendar year view. This is a dependency property.
Top
Events
  NameDescription
Public eventDisplayDateChanged
Occurs when the DisplayDate property is changed.
Public eventDisplayModeChanged
Occurs when the DisplayMode property is changed.
Public eventSelectionChanged
Occurs when a date is selected.
Top
Remarks

The Calendar control allows the user to select a single date.

The user can navigate in the Calendar by clicking the arrow buttons in the calendar header that would cycle through the list of days, months or years. Clicking in-between the two arrows would change the DisplayMode of the calendar so that it displays a year if a month was displayed (The same applies for. Clicking the button with today's date would navigate to the month view of the current month.

The SelectionMode allows more than one date to be selected. There are three modes of selection - SelectionMode.Single, SelectionMode.Multiple and SelectionMode.Extended. Advanced keyboard selection - dragging while holding Ctrl or/and Shift is supported. The SelectedDates property is a list of all selected dates.

The DisplayMode property allows you to get or set the current display mode. By handling the DisplayModeChanged routed event you would receive a notification whenever a change in the display mode occurs.

Disabling or enabling the selection of dates can be controlled by the SelectableDateStart and SelectableDateEnd properties. If none of the latter two has been set, i.e. their value is null then all the calendar dates are selectable.

The SelectedDate property holds the DateTime value of the selected date. The default value is null (no date is selected). Adding a handler for the SelectedDate event would enable you to be notified whenever a date is selected.

Similarly, to modify which dates the user can navigate to, use the DisplayDateStart and DisplayDateEnd properties. Setting the DisplayDate property navigates the calendar to the month or year that contain this date (depending on the current DisplayMode). Please note that the DisplayDate property cannot be set to null.

The Calendar has more than 20 properties which allow you to set styles, style selectors, templates and template selectors for the different views and buttons of the Calendar. The Calendar help articles provide more information on the control parts and template structures.

Please note that the RadCalendar currently supports only Gregorian calendar.

See Also