skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • NEW: Design Kits for Figma
    • Online Training
    • Document Processing Library
    • Embedded Reporting for web and desktop

    Web

    Kendo UI UI for Angular UI for Vue UI for jQuery KendoReact UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Telerik JustMock

    CMS

    Sitefinity

    AI Productivity Tools

    AI Coding Assistants

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    KendoReact Free VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Support and Learning

    • Support and Learning Hub
    • First Steps
    • Docs
    • Demos
    • Virtual Classroom
    • Forums
    • Videos
    • Blogs
    • Accessibility
    • Submit a Ticket

    Productivity and Design Tools

    • Visual Studio Extensions
    • Visual Studio Templates
    • Embedded Reporting
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class RadCalendar

Represents a selection control that allows you to select dates from a calendar.

Inheritance
System.Object
RadCalendar
Namespace: Telerik.Windows.Controls
Assembly: Telerik.Windows.Controls.Input.dll

Syntax

[Themable]
[TelerikToolboxCategory("Input")]
public class RadCalendar : Control, IThemable
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.

Constructors

RadCalendar()

Initializes a new instance of the RadCalendar class.

Declaration
public RadCalendar()
Remarks

Please refer to the RadCalendar information examples on how to use the control.

See Also
RadCalendar

Fields

AreWeekNamesVisibleProperty

Identifies the property.

Declaration
public static readonly DependencyProperty AreWeekNamesVisibleProperty
Field Value
System.Windows.DependencyProperty

AreWeekNumbersVisibleProperty

Identifies the property.

Declaration
public static readonly DependencyProperty AreWeekNumbersVisibleProperty
Field Value
System.Windows.DependencyProperty

BlackoutDatesProperty

Identifies the property.

Declaration
public static readonly DependencyProperty BlackoutDatesProperty
Field Value
System.Windows.DependencyProperty

CalendarWeekRuleProperty

Identifies the property.

Declaration
public static readonly DependencyProperty CalendarWeekRuleProperty
Field Value
System.Windows.DependencyProperty

CenturyViewHeaderFormatProperty

Identifies the property.

Declaration
public static readonly DependencyProperty CenturyViewHeaderFormatProperty
Field Value
System.Windows.DependencyProperty

CenturyViewPanelProperty

Identifies the property.

Declaration
public static readonly DependencyProperty CenturyViewPanelProperty
Field Value
System.Windows.DependencyProperty

CenturyViewStyleProperty

Identifies the property.

Declaration
public static readonly DependencyProperty CenturyViewStyleProperty
Field Value
System.Windows.DependencyProperty

ColumnsProperty

Identifies the property.

Declaration
public static readonly DependencyProperty ColumnsProperty
Field Value
System.Windows.DependencyProperty

CultureProperty

Identifies the property.

Declaration
public static readonly DependencyProperty CultureProperty
Field Value
System.Windows.DependencyProperty

DateSelectionModeProperty

Identifies the property.

Declaration
public static readonly DependencyProperty DateSelectionModeProperty
Field Value
System.Windows.DependencyProperty

DayButtonStyleProperty

Identifies the property.

Declaration
public static readonly DependencyProperty DayButtonStyleProperty
Field Value
System.Windows.DependencyProperty

DayButtonStyleSelectorProperty

Identifies the property.

Declaration
public static readonly DependencyProperty DayButtonStyleSelectorProperty
Field Value
System.Windows.DependencyProperty

DayTemplateProperty

Identifies the property.

Declaration
public static readonly DependencyProperty DayTemplateProperty
Field Value
System.Windows.DependencyProperty

DayTemplateSelectorProperty

Identifies the property.

Declaration
public static readonly DependencyProperty DayTemplateSelectorProperty
Field Value
System.Windows.DependencyProperty

DecadeButtonStyleProperty

Identifies the property.

Declaration
public static readonly DependencyProperty DecadeButtonStyleProperty
Field Value
System.Windows.DependencyProperty

DecadeButtonStyleSelectorProperty

Identifies the property.

Declaration
public static readonly DependencyProperty DecadeButtonStyleSelectorProperty
Field Value
System.Windows.DependencyProperty

DecadeTemplateProperty

Identifies the property.

Declaration
public static readonly DependencyProperty DecadeTemplateProperty
Field Value
System.Windows.DependencyProperty

DecadeTemplateSelectorProperty

Identifies the property.

Declaration
public static readonly DependencyProperty DecadeTemplateSelectorProperty
Field Value
System.Windows.DependencyProperty

DecadeViewHeaderFormatProperty

Identifies the property.

Declaration
public static readonly DependencyProperty DecadeViewHeaderFormatProperty
Field Value
System.Windows.DependencyProperty

DecadeViewPanelProperty

Identifies the property.

Declaration
public static readonly DependencyProperty DecadeViewPanelProperty
Field Value
System.Windows.DependencyProperty

DecadeViewStyleProperty

Identifies the property.

Declaration
public static readonly DependencyProperty DecadeViewStyleProperty
Field Value
System.Windows.DependencyProperty

DisplayDateChangedEvent

Identifies the Event.

Declaration
public static readonly RoutedEvent DisplayDateChangedEvent
Field Value
System.Windows.RoutedEvent

DisplayDateEndProperty

Identifies the Property.

Declaration
public static readonly DependencyProperty DisplayDateEndProperty
Field Value
System.Windows.DependencyProperty

DisplayDateProperty

Identifies the property.

Declaration
public static readonly DependencyProperty DisplayDateProperty
Field Value
System.Windows.DependencyProperty

DisplayDateStartProperty

Identifies the .

Declaration
public static readonly DependencyProperty DisplayDateStartProperty
Field Value
System.Windows.DependencyProperty

DisplayModeChangedEvent

Identifies the Event.

Declaration
public static readonly RoutedEvent DisplayModeChangedEvent
Field Value
System.Windows.RoutedEvent

DisplayModeProperty

Identifies the Property.

Declaration
public static readonly DependencyProperty DisplayModeProperty
Field Value
System.Windows.DependencyProperty

FirstDayOfWeekProperty

Identifies the property.

Declaration
public static readonly DependencyProperty FirstDayOfWeekProperty
Field Value
System.Windows.DependencyProperty

HeaderVisibilityProperty

Identifies the property.

Declaration
public static readonly DependencyProperty HeaderVisibilityProperty
Field Value
System.Windows.DependencyProperty

IsReadOnlyProperty

Identifies the property.

Declaration
public static readonly DependencyProperty IsReadOnlyProperty
Field Value
System.Windows.DependencyProperty

IsTodayHighlightedProperty

Identifies the dependency property.

Declaration
public static readonly DependencyProperty IsTodayHighlightedProperty
Field Value
System.Windows.DependencyProperty

MaxDate

Gets the latest date that the calendar can display.

Declaration
public static readonly DateTime MaxDate
Field Value
System.DateTime

MinDate

Gets the earliest date that the calendar can display.

Declaration
public static readonly DateTime MinDate
Field Value
System.DateTime

MonthButtonStyleProperty

Identifies the property.

Declaration
public static readonly DependencyProperty MonthButtonStyleProperty
Field Value
System.Windows.DependencyProperty

MonthButtonStyleSelectorProperty

Identifies the property.

Declaration
public static readonly DependencyProperty MonthButtonStyleSelectorProperty
Field Value
System.Windows.DependencyProperty

MonthTemplateProperty

Identifies the property.

Declaration
public static readonly DependencyProperty MonthTemplateProperty
Field Value
System.Windows.DependencyProperty

MonthTemplateSelectorProperty

Identifies the property.

Declaration
public static readonly DependencyProperty MonthTemplateSelectorProperty
Field Value
System.Windows.DependencyProperty

MonthViewHeaderFormatProperty

Identifies the property.

Declaration
public static readonly DependencyProperty MonthViewHeaderFormatProperty
Field Value
System.Windows.DependencyProperty

MonthViewPanelProperty

Identifies the property.

Declaration
public static readonly DependencyProperty MonthViewPanelProperty
Field Value
System.Windows.DependencyProperty

MonthViewStyleProperty

Identifies the property.

Declaration
public static readonly DependencyProperty MonthViewStyleProperty
Field Value
System.Windows.DependencyProperty

NextButtonVisibilityProperty

Identifies the property.

Declaration
public static readonly DependencyProperty NextButtonVisibilityProperty
Field Value
System.Windows.DependencyProperty

OrientationProperty

Identifies the property.

Declaration
public static readonly DependencyProperty OrientationProperty
Field Value
System.Windows.DependencyProperty

PreviousButtonVisibilityProperty

Identifies the property.

Declaration
public static readonly DependencyProperty PreviousButtonVisibilityProperty
Field Value
System.Windows.DependencyProperty

RowsProperty

Identifies the property.

Declaration
public static readonly DependencyProperty RowsProperty
Field Value
System.Windows.DependencyProperty

SelectableDateEndProperty

Identifies the property.

Declaration
public static readonly DependencyProperty SelectableDateEndProperty
Field Value
System.Windows.DependencyProperty

SelectableDateStartProperty

Identifies the dependency property.

Declaration
public static readonly DependencyProperty SelectableDateStartProperty
Field Value
System.Windows.DependencyProperty

SelectedDateProperty

Identifies the dependency property.

Declaration
public static readonly DependencyProperty SelectedDateProperty
Field Value
System.Windows.DependencyProperty

SelectionChangedEvent

Identifies the Event.

Declaration
public static readonly RoutedEvent SelectionChangedEvent
Field Value
System.Windows.RoutedEvent

SelectionModeProperty

Identifies the dependency property.

Declaration
public static readonly DependencyProperty SelectionModeProperty
Field Value
System.Windows.DependencyProperty

UseShortestDayNamesProperty

Identifies the property. The value that indicates whether the week names buttons are using shortest day names. It's used in office 2013 theme.

Declaration
public static readonly DependencyProperty UseShortestDayNamesProperty
Field Value
System.Windows.DependencyProperty

ViewsHeaderVisibilityProperty

Identifies the property.

Declaration
public static readonly DependencyProperty ViewsHeaderVisibilityProperty
Field Value
System.Windows.DependencyProperty

YearButtonStyleProperty

Identifies the property.

Declaration
public static readonly DependencyProperty YearButtonStyleProperty
Field Value
System.Windows.DependencyProperty

YearButtonStyleSelectorProperty

Identifies the property.

Declaration
public static readonly DependencyProperty YearButtonStyleSelectorProperty
Field Value
System.Windows.DependencyProperty

YearTemplateProperty

Identifies the property.

Declaration
public static readonly DependencyProperty YearTemplateProperty
Field Value
System.Windows.DependencyProperty

YearTemplateSelectorProperty

Identifies the property.

Declaration
public static readonly DependencyProperty YearTemplateSelectorProperty
Field Value
System.Windows.DependencyProperty

YearViewHeaderFormatProperty

Identifies the property.

Declaration
public static readonly DependencyProperty YearViewHeaderFormatProperty
Field Value
System.Windows.DependencyProperty

YearViewPanelProperty

Identifies the property.

Declaration
public static readonly DependencyProperty YearViewPanelProperty
Field Value
System.Windows.DependencyProperty

YearViewStyleProperty

Identifies the property.

Declaration
public static readonly DependencyProperty YearViewStyleProperty
Field Value
System.Windows.DependencyProperty

Properties

AreWeekNamesVisible

Gets or sets whether WeekNames will be displayed.

Declaration
public bool AreWeekNamesVisible { get; set; }
Property Value
System.Boolean

Remarks

Please note that if you hide the WeekNames would not automatically change the template of the calendar. Depending on the skin, you may need to change the template to visually make up for the fewer displayed elements.

The AreWeekNumbersVisible can also be hidden.

The default value is true.

AreWeekNumbersVisible

Gets or sets whether WeekNumbers will be displayed.

Declaration
public bool AreWeekNumbersVisible { get; set; }
Property Value
System.Boolean

Remarks

Please note that if you hide the WeekNumbers it would not automatically change the template of the calendar. Depending on the skin, you may need to change the template to visually make up for the fewer displayed elements.

The AreWeekNamesVisible can also be hidden.

The default value is true.

BlackoutDates

Gets or sets a list of dates that cannot be selected. This is a dependency property.

Declaration
public IEnumerable<DateTime> BlackoutDates { get; set; }
Property Value
System.Collections.Generic.IEnumerable<System.DateTime>

Remarks

The BlackoutDates specifies a list of dates that cannot be selected by the user.

CalendarWeekRule

Gets or sets how should the first week in the year be counted. This is a dependency property.

Declaration
public Nullable<CalendarWeekRule> CalendarWeekRule { get; set; }
Property Value
System.Nullable<System.Globalization.CalendarWeekRule>

Remarks

By default if no value is set (or is set to null), the CalendarWeek rule will be taken from Culture property (or InvariantCulture)'s DateTimeFormat.CalendarWeekRule.

CenturyViewHeaderFormat

Gets or sets the format for the header of the century views of the calendar. This is a dependency property.

Declaration
public string CenturyViewHeaderFormat { get; set; }
Property Value
System.String

Remarks

The CenturyViewHeaderFormat is a DateTime format which will be used for the header of the CenturyView.

If the property is set to null, a default format "yyyy" will be used.

CenturyViewPanel

Gets or sets the items panel template for the century views of the calendar. This is a dependency property.

Declaration
public ItemsPanelTemplate CenturyViewPanel { get; set; }
Property Value
System.Windows.Controls.ItemsPanelTemplate

CenturyViewStyle

Gets or sets the style of the century calendar view. This is a dependency property.

Declaration
public Style CenturyViewStyle { get; set; }
Property Value
System.Windows.Style

Columns

Gets or sets the number of columns of calendar views in the calendar. This is a dependency property.

Declaration
public int Columns { get; set; }
Property Value
System.Int32

Remarks

The minimum value of the Columns property is one and the maximum is four.

See Also
Rows

Culture

Gets or sets the culture that the Calendar uses. This is a dependency property.

Declaration
public CultureInfo Culture { get; set; }
Property Value
System.Globalization.CultureInfo

Remarks

Some of the elements in the Calendar are culture-specific, for example: The day/month names, rules for date formatting, the FirstDayOfWeek, CalendarWeekRule. Some more specific properties like FirstDayOfWeek take precedence over the Culture property if they are set.

If no Culture is specified, all the elements that rely on it will fall back to the CultureInfo.CurrentCulture.

The default value is null.

DateSelectionMode

Gets or sets DateSelectionMode property. This is a dependency property.

Declaration
public DateSelectionMode DateSelectionMode { get; set; }
Property Value
DateSelectionMode

DayButtonStyle

Gets or sets the style for the day buttons in the month views of the calendar. This is a dependency property.

Declaration
public Style DayButtonStyle { get; set; }
Property Value
System.Windows.Style

Remarks

The DayButtonStyleSelector together with the DayButtonStyle specify the Style of the Day buttons in the Month CalendarView.

For more information on styling, see the Calendar help articles.

DayButtonStyleSelector

Gets or sets the style selector for the day buttons in the month views of the Calendar.

Declaration
public StyleSelector DayButtonStyleSelector { get; set; }
Property Value
System.Windows.Controls.StyleSelector

Remarks

The DayButtonStyleSelector together with the DayButtonStyle specify the Style of the Day buttons in the Month CalendarView.

For more information on styling, see the Calendar help articles.

DayTemplate

Gets or sets the content templates for the day buttons in the month views of the calendar. This is a dependency property.

Declaration
public DataTemplate DayTemplate { get; set; }
Property Value
System.Windows.DataTemplate

Remarks

The DayTemplateSelector together with the DayTemplate specify the DataTemplate of the Day buttons in the Month CalendarView.

For more information on styling, see the Calendar help articles.

DayTemplateSelector

Gets or sets the DataTemplate selectors for the day buttons in the month views of the calendar. This is a dependency property.

Declaration
public DataTemplateSelector DayTemplateSelector { get; set; }
Property Value
System.Windows.Controls.DataTemplateSelector

Remarks

The DayTemplateSelector together with the DayTemplate specify the DataTemplate of the Day buttons in the Month CalendarView.

For more information on styling, see the Calendar help articles.

DecadeButtonStyle

Gets or sets the style for the year decade in the century views of the calendar. This is a dependency property.

Declaration
public Style DecadeButtonStyle { get; set; }
Property Value
System.Windows.Style

Remarks

The DecadeButtonStyleSelector together with the DecadeButtonStyle specify the Style of the Day buttons in the Century CalendarView.

For more information on styling, see the Calendar help articles.

DecadeButtonStyleSelector

Gets or sets the style selector for the decade buttons in the century views of the Calendar.

Declaration
public StyleSelector DecadeButtonStyleSelector { get; set; }
Property Value
System.Windows.Controls.StyleSelector

Remarks

The DecadeButtonStyleSelector together with the DecadeButtonStyle specify the Style of the Day buttons in the Century CalendarView.

For more information on styling, see the Calendar help articles.

DecadeTemplate

Gets or sets the content templates for the decade buttons in the century views of the calendar. This is a dependency property.

Declaration
public DataTemplate DecadeTemplate { get; set; }
Property Value
System.Windows.DataTemplate

Remarks

The DecadeTemplateSelector together with the DecadeTemplate specify the DataTemplate of the Decade buttons in the Century CalendarView.

For more information on styling, see the Calendar help articles.

DecadeTemplateSelector

Gets or sets the DataTemplate selectors for the decade buttons in the century views of the calendar. This is a dependency property.

Declaration
public DataTemplateSelector DecadeTemplateSelector { get; set; }
Property Value
System.Windows.Controls.DataTemplateSelector

Remarks

The DecadeTemplateSelector together with the DecadeTemplate specify the DataTemplate of the Decade buttons in the Century CalendarView.

For more information on styling, see the Calendar help articles.

DecadeViewHeaderFormat

Gets or sets the format for the header of the decade views of the calendar. This is a dependency property.

Declaration
public string DecadeViewHeaderFormat { get; set; }
Property Value
System.String

Remarks

The DecadeViewHeaderFormat is a DateTime format which will be used for the header of the DecadeView.

If the property is set to null, a default format "yyyy" will be used.

DecadeViewPanel

Gets or sets the items panel template for the decade views of the calendar. This is a dependency property.

Declaration
public ItemsPanelTemplate DecadeViewPanel { get; set; }
Property Value
System.Windows.Controls.ItemsPanelTemplate

Remarks

The DecadeView Panel specifies the panel that arranges the year buttons in the decade view. By default it is an UniformGrid with 3 rows and 4 columns.

For more information on styling, see the Calendar help articles.

DecadeViewStyle

Gets or sets the style of the decade calendar view. This is a dependency property.

Declaration
public Style DecadeViewStyle { get; set; }
Property Value
System.Windows.Style

Remarks

The decade view style specifies the style for the decade view. By setting the style every aspect of the CalendarView can be changed.

For more information on styling, see the Calendar help articles.

DisplayDate

Gets or sets the current date to display. This is a dependency property.

Declaration
public DateTime DisplayDate { get; set; }
Property Value
System.DateTime

Remarks

The DisplayDate property specifies the date to display in the RadCalendar. If no display date was set, then the SelectedDate is used. Alternatively, if no date is selected then DateTime.Today is used.

Setting the display date does not affect the DisplayMode of the Calendar, e.g. if the DisplayMode is set to Year changing the DisplayDate within the same year would not change the view, while setting a DisplayDate of a different year would change the view.

Similarly to the other date properties of the Calendar, the time part of the DateTime object is not only ignored but set to 00:00:00 as well. See SelectedDate for an example and more information on that behavior.

The DisplayDateStart and DisplayDateEnd properties defined a range within which the DisplayDate can be set, i.e. a range within which the user can navigate. If you try to set a DisplayDate outside the defined range an ArgumentOutOfRangeException would be thrown. Similarly, setting a display range that excludes the current DisplayDate would throw an exception.

Changing the DisplayDate property fires the DisplayDateChanged event. Please note that unless the DisplayDate is changed from code the event would fire only when the displayed month or year actually changes, i.e. selecting a day within the currently viewed month would not fire the event (or change the property). Selecting a month while the DisplayMode is Year would fire the event if the month is different from the previously selected.

Please note that unlike the other date properties DisplayDate cannot be set to null.

See Also
SelectedDate
DisplayDateStart
DisplayDateEnd
SelectableDateStart
SelectableDateEnd

DisplayDateEnd

Gets or sets the last date that would be able to be displayed. This is a dependency property.

Declaration
public Nullable<DateTime> DisplayDateEnd { get; set; }
Property Value
System.Nullable<System.DateTime>

Remarks

The DisplayDateEnd property can limit the dates which can be navigated to. The DisplayDateEnd is the date furthest away in time that can be displayed. Setting the property to null would enable all dates to be viewed.

Please note that ArgumentOutOfRange exception would be thrown if the DisplayDateEnd is set to a date earlier than the currently displayed date (DisplayDate).

More information about setting the displayable dates' range and an example can be found on the DisplayDateStart help page.

See Also
DisplayDateStart
DisplayDate

DisplayDateStart

Gets or sets the first date that would be able to be displayed. This is a dependency property.

Declaration
public Nullable<DateTime> DisplayDateStart { get; set; }
Property Value
System.Nullable<System.DateTime>

Remarks

The DisplayDateStart property together with DisplayDateEnd allows you to define a range within which the user would be able to navigate. The DisplayDateStart does not affect whether a date can be selected or not. Please refer to SelectableDateStart for more information on controlling selection.

For example setting the DisplayDateStart to DateTime.Today would ensure that the Calendar would not be able to navigate to the previous month or year but changing the DisplayMode or selecting dates from the current month is unaffected.

Similarly to the other date properties of the Calendar, the time part of the DateTime object is not only ignored but set to 00:00:00 as well (coerced). See SelectedDate for an example and more information on that behavior.

Setting the DisplayDateStart to null means that DateTime.MinValue would be the start of the displayable range. The default values is null.

See Also
SelectedDate
DisplayDateStart
DisplayDateEnd
SelectableDateStart
SelectableDateEnd

DisplayMode

Gets or sets the display mode of the Calendar. This is a dependency property.

Declaration
public DisplayMode DisplayMode { get; set; }
Property Value
DisplayMode

Remarks

The DisplayMode property controls the span of time the calendar is currently displaying: month, year, decade and century.

The display mode can be changed by clicking the calendar header between the previous and next buttons and by choosing from the list of months/years/decades. Alternatively the DisplayMode can be changed programmatically although this is not recommended since this may contradict user expectations.

The DisplayModeChanged event is fired when the property changes. The CalendarModeChangedEventArgs provide the old and new value of the display mode. An example where the event is used can be found on the SelectedDate help page.

See Also
SelectedDate
CalendarModeChangedEventArgs
DisplayModeChanged
DisplayMode

FirstDayOfWeek

Gets or sets the day that is considered the beginning of the week.

Declaration
public Nullable<DayOfWeek> FirstDayOfWeek { get; set; }
Property Value
System.Nullable<System.DayOfWeek>

Remarks

The FirstDayOfWeek property specifies which is the day in the leftmost column of the calendar view, i.e. which is the first day of the week.

If the property is set to null, the Culture will be checked, if a specific culture is set, its FirstDayOfWeek is considered. Otherwise the CurrentCulture will be used.

Generally, the start of the week varies with different cultures so if you would like the Calendar to display the dates as you see them, be sure to set the FirstDayOfWeek property or the Culture property.

    calendar.FirstDayOfWeek = CultureInfo.CurrentCulture.DateTimeFormat.FirstDayOfWeek;

See Also
DisplayMode
Culture

HeaderVisibility

Gets or sets the visibility of the Calendar's header. This is a dependency property.

Declaration
public Visibility HeaderVisibility { get; set; }
Property Value
System.Windows.Visibility

Remarks

The header of the calendar is the area on the top in which the Header Button and the Previous and NextButtons reside.

To make the buttons invisible, but still have a header, you can set the HeaderVisibility to Collapsed and ViewsHeaderVisibility to Visible.

IsReadOnly

Gets or sets whether the Calendar's selection can be changed. This is a dependency property.

Declaration
public bool IsReadOnly { get; set; }
Property Value
System.Boolean

Remarks

The IsReadOnly property specifies whether the current selection can be changed. Please note that the IsReadOnly property governs user interaction, i.e. the selected dates can be changed programmatically - through a binding or setting the SelectedDate(s) properties.

To disable all the interaction with the Calendar, use the IsEnabled property.

IsTodayHighlighted

Gets or sets whether the today date would be highlighted. This is a dependency property.

Declaration
public bool IsTodayHighlighted { get; set; }
Property Value
System.Boolean

Remarks

The IsTodayHighlighted property indicates whether the today date in the calendar would be highlighted. The default value is true.

Please note that the IsTodayHighlighted property does not affect whether the today date is selected or not. Use the SelectedDate or SelectedDates properties to specify the selected date(s).

See Also
SelectedDate
SelectedDates

MonthButtonStyle

Gets or sets the style for the month buttons in the year views of the calendar. This is a dependency property.

Declaration
public Style MonthButtonStyle { get; set; }
Property Value
System.Windows.Style

Remarks

The MonthButtonStyleSelector together with the MonthButtonStyle specify the Style of the Month buttons in the Year CalendarView.

For more information on styling, see the Calendar help articles.

MonthButtonStyleSelector

Gets or sets the style selector for the month buttons in the year views of the Calendar.

Declaration
public StyleSelector MonthButtonStyleSelector { get; set; }
Property Value
System.Windows.Controls.StyleSelector

Remarks

The MonthButtonStyleSelector together with the MonthButtonStyle specify the Style of the Month buttons in the Year CalendarView.

For more information on styling, see the Calendar help articles.

MonthTemplate

Gets or sets the content templates for the month buttons in the year views of the calendar. This is a dependency property.

Declaration
public DataTemplate MonthTemplate { get; set; }
Property Value
System.Windows.DataTemplate

Remarks

The MonthTemplateSelector together with the MonthTemplate specify the DataTemplate of the Month buttons in the Year CalendarView.

For more information on styling, see the Calendar help articles.

MonthTemplateSelector

Gets or sets the DataTemplate selectors for the month buttons in the year views of the calendar. This is a dependency property.

Declaration
public DataTemplateSelector MonthTemplateSelector { get; set; }
Property Value
System.Windows.Controls.DataTemplateSelector

Remarks

The MonthTemplateSelector together with the MonthTemplate specify the DataTemplate of the Month buttons in the Year CalendarView.

For more information on styling, see the Calendar help articles.

MonthViewHeaderFormat

Gets or sets the format for the header of the month views of the calendar. This is a dependency property.

Declaration
public string MonthViewHeaderFormat { get; set; }
Property Value
System.String

Remarks

The MonthViewHeaderFormat is a DateTime format which will be used for the header of the MonthView.

If the property is set to null, a default format "MMMM' - 'yyyy" will be used.

MonthViewPanel

Gets or sets the items panel template for the month views of the calendar. This is a dependency property.

Declaration
public ItemsPanelTemplate MonthViewPanel { get; set; }
Property Value
System.Windows.Controls.ItemsPanelTemplate

Remarks

The MonthView Panel specifies the panel that arranges the day buttons in the month view. By default it is an UniformGrid with 7 rows and 8 columns.

For more information on styling, see the Calendar help articles.

MonthViewStyle

Gets or sets the style of the month calendar view. This is a dependency property.

Declaration
public Style MonthViewStyle { get; set; }
Property Value
System.Windows.Style

Remarks

The month view style specifies the style for the month view. By setting the style every aspect of the CalendarView can be changed.

For more information on styling, see the Calendar help articles.

NextButtonVisibility

Gets or sets the visibility of the Calendar's MoveRight button. This is a dependency property.

Declaration
public Visibility NextButtonVisibility { get; set; }
Property Value
System.Windows.Visibility

Remarks

The MoveRight button of the calendar is in the area on the top in which the Header Button and the PreviousButton reside.

Orientation

Gets or sets whether the orientation of the Calendar. This is a dependency property.

Declaration
public Orientation Orientation { get; set; }
Property Value
System.Windows.Controls.Orientation

Remarks

The Orientation property specifies how should the dates be arranged with regard to the position of the Week Names and Week Numbers. When the orientation is Horizontal, the WeekNames appear on top, horizontally while the week numbers are a column on the left. If the Orientation is Vertical, the WeekNames are arranged in a Column on the left, and the numbers are a row on the top.

The default value is Horizontal.

PreviousButtonVisibility

Gets or sets the visibility of the Calendar's MoveLeft button. This is a dependency property.

Declaration
public Visibility PreviousButtonVisibility { get; set; }
Property Value
System.Windows.Visibility

Remarks

The MoveLeft button of the calendar is in the area on the top in which the Header Button and the NextButton reside.

Rows

Gets or sets the number of rows of calendar views in the calendar. This is a dependency property.

Declaration
public int Rows { get; set; }
Property Value
System.Int32

Remarks

When there is more than one calendar view present, the ViewsHeaderVisibility may make identifying the different months/years easier.

The minimum value of the Rows property is one and the maximum is four.

See Also
Columns

SelectableDateEnd

Gets or sets the last date that can be selected. This is a dependency property.

Declaration
public Nullable<DateTime> SelectableDateEnd { get; set; }
Property Value
System.Nullable<System.DateTime>

Remarks

The SelectableDateEnd specifies the last date that can be selected by the user.

Please note that the SelectableDateEnd should not be set to a date larger than the DisplayDateEnd or MaxDate. The SelectableDate end cannot be set to a date smaller than the SelectedDate.

To specify the range of dates that will be visible to the users, use DisplayDateStart and DisplayDateEnd.

SelectableDateStart

Gets or sets the first date that can be selected. This is a dependency property.

Declaration
public Nullable<DateTime> SelectableDateStart { get; set; }
Property Value
System.Nullable<System.DateTime>

Remarks

The SelectableDateStart specifies the first date that can be selected by the user.

Please note that the SelectableDateStart should not be set to a date larger than the SelectedDate. The SelectableDate end cannot be set to a date smaller than the DisplayDateStart or MinDate

To specify the range of dates that will be visible to the users, use DisplayDateStart and DisplayDateEnd.

SelectedDate

Gets or sets the currently selected date. This is a dependency property.

Declaration
public Nullable<DateTime> SelectedDate { get; set; }
Property Value
System.Nullable<System.DateTime>

Remarks

The SelectedDate property identifies the last date that has been selected. If more than one date needs to be selected, please see the SelectedDates property.

Setting the SelectedDate property to null would deselect any selection. The default value is null.

Selecting a date fires the SelectedDate event. An example about handling events is provided below.

Please note that the user would not be able to select dates outside the SelectableDates range defined by the SelectableDateStart and SelectableDateEnd properties.

Note that all DateTime properties of the RadCalendar discard the time of the DateTime object, i.e. the time is coerced to 0:0:0.

SelectedDates

Gets an list of the currently selected dates.

Declaration
public IList<DateTime> SelectedDates { get; }
Property Value
System.Collections.Generic.IList<System.DateTime>

Remarks

The SelectedDates collection is an observable collection (although it is exposed as an IList) which contains the currently selected dates and can be used in binding.

In Single SelectionMode the collection would still be populated with the selected date (if any).

Just as with SelectedDate, all the dates in the collection will be coerced and should be between the SelectableDateStart/End and DisplayDateStart/End.

SelectionMode

Gets or sets the types of selection that would be allowed in the Calendar. This is a dependency property.

Declaration
public SelectionMode SelectionMode { get; set; }
Property Value
System.Windows.Controls.SelectionMode

Remarks

The Selection mode in the Calendar works very much like the SelectionMode in a ListBox.

Selection across several months is possible, either by navigating to a different month and selecting dates there or by displaying more than one months at a time (See Rows and Columns properties).

The default value is Single.

UseShortestDayNames

Gets or sets UseShortestDayNames property. This is a dependency property.

Declaration
public bool UseShortestDayNames { get; set; }
Property Value
System.Boolean

ViewsHeaderVisibility

Gets or sets the visibility of the header of the calendar views (month, year, decade, century). This is a dependency property.

Declaration
public Visibility ViewsHeaderVisibility { get; set; }
Property Value
System.Windows.Visibility

Remarks

When multi-view calendar is used (the Rows and Columns properties have been set) showing the CalendarViews headers helps the specific views to be identified. For example if 4 months are visible, headers would appear on top of each month and not just the calendar header.

The default value is Collapsed.

YearButtonStyle

Gets or sets the style for the year buttons in the decade views of the calendar. This is a dependency property.

Declaration
public Style YearButtonStyle { get; set; }
Property Value
System.Windows.Style

Remarks

The YearButtonStyleSelector together with the YearButtonStyle specify the Style of the Year buttons in the Decade CalendarView.

For more information on styling, see the Calendar help articles.

YearButtonStyleSelector

Gets or sets the style selector for the year buttons in the decade views of the Calendar.

Declaration
public StyleSelector YearButtonStyleSelector { get; set; }
Property Value
System.Windows.Controls.StyleSelector

Remarks

The YearButtonStyleSelector together with the YearButtonStyle specify the Style of the Year buttons in the Decade CalendarView.

For more information on styling, see the Calendar help articles.

YearTemplate

Gets or sets the content templates for the year buttons in the decade views of the calendar. This is a dependency property.

Declaration
public DataTemplate YearTemplate { get; set; }
Property Value
System.Windows.DataTemplate

Remarks

The YearTemplateSelector together with the YearTemplate specify the DataTemplate of the Year buttons in the Decade CalendarView.

For more information on styling, see the Calendar help articles.

YearTemplateSelector

Gets or sets the DataTemplate selectors for the year buttons in the decade views of the calendar. This is a dependency property.

Declaration
public DataTemplateSelector YearTemplateSelector { get; set; }
Property Value
System.Windows.Controls.DataTemplateSelector

Remarks

The YearTemplateSelector together with the YearTemplate specify the DataTemplate of the Year buttons in the Decade CalendarView.

For more information on styling, see the Calendar help articles.

YearViewHeaderFormat

Gets or sets the format for the header of the year views of the calendar. This is a dependency property.

Declaration
public string YearViewHeaderFormat { get; set; }
Property Value
System.String

Remarks

The YearViewHeaderFormat is a DateTime format which will be used for the header of the YearView.

If the property is set to null, a default format "yyyy" will be used.

YearViewPanel

Gets or sets the items panel template for the year views of the calendar. This is a dependency property.

Declaration
public ItemsPanelTemplate YearViewPanel { get; set; }
Property Value
System.Windows.Controls.ItemsPanelTemplate

Remarks

The YearView Panel specifies the panel that arranges the month buttons in the year view. By default it is an UniformGrid with 3 rows and 4 columns.

For more information on styling, see the Calendar help articles.

YearViewStyle

Gets or sets the style of the calendar year view. This is a dependency property.

Declaration
public Style YearViewStyle { get; set; }
Property Value
System.Windows.Style

Remarks

The year view style specifies the style for the year view. By setting the style every aspect of the CalendarView can be changed.

For more information on styling, see the Calendar help articles.

Methods

IsDisplayDateEndValid(RadCalendar, Nullable<DateTime>)

Checks whether the date is a valid DisplayDateEnd value for the given calendar.

Declaration
public static bool IsDisplayDateEndValid(RadCalendar calendar, Nullable<DateTime> newDisplayDateEnd)
Parameters
RadCalendar calendar

The calendar for which to test the value.

System.Nullable<System.DateTime> newDisplayDateEnd

The date to test.

Returns
System.Boolean

True if it is a valid display date end, false otherwise.

IsDisplayDateStartValid(RadCalendar, Nullable<DateTime>)

Checks whether the date is a valid DisplayDateStart value for the given calendar.

Declaration
public static bool IsDisplayDateStartValid(RadCalendar calendar, Nullable<DateTime> newDisplayDate)
Parameters
RadCalendar calendar

The calendar for which to test the value.

System.Nullable<System.DateTime> newDisplayDate

The date to test.

Returns
System.Boolean

True if it is a valid display date start, false otherwise.

IsDisplayDateValid(RadCalendar, DateTime)

Checks whether the given date is a valid display date for the calendar.

Declaration
public static bool IsDisplayDateValid(RadCalendar calendar, DateTime newDisplayDate)
Parameters
RadCalendar calendar

The calendar to check the display date for.

System.DateTime newDisplayDate

The new display date to test.

Returns
System.Boolean

True if it is a valid display date, false otherwise.

IsSelectableDateEndValid(RadCalendar, Nullable<DateTime>)

Checks whether the date is a valid SelectableDateEnd value for the given calendar.

Declaration
public static bool IsSelectableDateEndValid(RadCalendar calendar, Nullable<DateTime> newSelectableDateEnd)
Parameters
RadCalendar calendar

The calendar to test for.

System.Nullable<System.DateTime> newSelectableDateEnd

The date to test.

Returns
System.Boolean

True if it is a valid selectable date end, false otherwise.

IsSelectableDateStartValid(RadCalendar, Nullable<DateTime>)

Checks whether the date is a valid SelectableDateStart value for the given calendar.

Declaration
public static bool IsSelectableDateStartValid(RadCalendar calendar, Nullable<DateTime> newSelectableDateStart)
Parameters
RadCalendar calendar

The calendar to test for.

System.Nullable<System.DateTime> newSelectableDateStart

The date to test.

Returns
System.Boolean

True if it is a valid selectable date start, false otherwise.

OnApplyTemplate()

When overridden in a derived class, is invoked whenever application code or internal processes call System.Windows.FrameworkElement.ApplyTemplate.

Declaration
public override void OnApplyTemplate()

OnBlackOutDatesChanged(IEnumerable<DateTime>, IEnumerable<DateTime>)

Called when BlackoutDates collection changed.

Declaration
protected virtual void OnBlackOutDatesChanged(IEnumerable<DateTime> oldCollection, IEnumerable<DateTime> newCollection)
Parameters
System.Collections.Generic.IEnumerable<System.DateTime> oldCollection

The old value.

System.Collections.Generic.IEnumerable<System.DateTime> newCollection

The new value.

OnCreateAutomationPeer()

Returns class-specific System.Windows.Automation.Peers.AutomationPeer implementations for the Windows Presentation Foundation (WPF) infrastructure.

Declaration
protected override AutomationPeer OnCreateAutomationPeer()
Returns
System.Windows.Automation.Peers.AutomationPeer

OnDisplayDateChanged(CalendarDateChangedEventArgs)

The OnDisplayDateChanged is called when the display date of the calendar changes.

Declaration
protected virtual void OnDisplayDateChanged(CalendarDateChangedEventArgs e)
Parameters
CalendarDateChangedEventArgs e

The parameter contains the new and the old display dates.

OnDisplayModeChanged(CalendarModeChangedEventArgs)

OnDisplayModeChanged is called when the display mode of the calendar changes.

Declaration
protected virtual void OnDisplayModeChanged(CalendarModeChangedEventArgs e)
Parameters
CalendarModeChangedEventArgs e

The parameter contains the old and the new display modes.

OnGotFocus(RoutedEventArgs)

Called before the System.Windows.UIElement.GotFocus event occurs.

Declaration
protected override void OnGotFocus(RoutedEventArgs e)
Parameters
System.Windows.RoutedEventArgs e

The data for the event.

OnInitialized(EventArgs)

Raises the System.Windows.FrameworkElement.Initialized event. This method is invoked whenever System.Windows.FrameworkElement.IsInitialized is set to true internally.

Declaration
protected override void OnInitialized(EventArgs e)
Parameters
System.EventArgs e

The System.Windows.RoutedEventArgs that contains the event data.

OnKeyDown(KeyEventArgs)

Called before the System.Windows.UIElement.KeyDown event occurs.

Declaration
protected override void OnKeyDown(KeyEventArgs e)
Parameters
System.Windows.Input.KeyEventArgs e

The data for the event.

OnMouseLeave(MouseEventArgs)

Called before the System.Windows.UIElement.MouseLeave event occurs.

Declaration
protected override void OnMouseLeave(MouseEventArgs e)
Parameters
System.Windows.Input.MouseEventArgs e

The data for the event.

OnMouseLeftButtonDown(MouseButtonEventArgs)

Called before the System.Windows.UIElement.MouseLeftButtonDown event occurs.

Declaration
protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
Parameters
System.Windows.Input.MouseButtonEventArgs e

The data for the event.

OnSelectionChanged(SelectionChangedEventArgs)

OnSelectionChanged is called whenever the selected dates of the calendar change.

Declaration
protected virtual void OnSelectionChanged(SelectionChangedEventArgs e)
Parameters
System.Windows.Controls.SelectionChangedEventArgs e

Parameter that describes how the selection has changed.

OnSelectionModeChanged(SelectionMode, SelectionMode)

Called when SelectionMode changed.

Declaration
protected virtual void OnSelectionModeChanged(SelectionMode oldValue, SelectionMode newValue)
Parameters
System.Windows.Controls.SelectionMode oldValue

The old value.

System.Windows.Controls.SelectionMode newValue

The new value.

ResetTheme()

Resets the theme.

Declaration
public void ResetTheme()

Events

DisplayDateChanged

Occurs when the DisplayDate property is changed.

Declaration
public event EventHandler<CalendarDateChangedEventArgs> DisplayDateChanged
Event Type
System.EventHandler<CalendarDateChangedEventArgs>

Remarks

The DisplayDateChanged event is fired when the DisplayDate property of the calendar changes.

For more information on the event go to the DisplayDate help article.

See Also
RadCalendar
DisplayDate
SelectedDate
DisplayDateStart
DisplayDateEnd
CalendarDateChangedEventArgs

DisplayModeChanged

Occurs when the DisplayMode property is changed.

Declaration
public event EventHandler<CalendarModeChangedEventArgs> DisplayModeChanged
Event Type
System.EventHandler<CalendarModeChangedEventArgs>

Remarks

The DisplayModeChanged event is fired when the DisplayDate property changes.

For more information please go to the DisplayMode article.

See Also
RadCalendar
DisplayMode
SelectedDate

SelectionChanged

Occurs when a date is selected.

Declaration
public event SelectionChangedEventHandler SelectionChanged
Event Type
System.Windows.Controls.SelectionChangedEventHandler

Remarks

The DateSelected event is fired when the SelectedDate or SelectedDates have changed.

The DateSelected is designed to be used in single selection mode. For more information on handling events in multiple selection mode, please refer to SelectedDates help article.

See Also
RadCalendar
SelectedDate
SelectableDateStart
SelectableDateEnd
System.Windows.Controls.SelectionChangedEventArgs

Extension Methods

CollectionExtensions.ToEnumerable<T>(T)
EnumerableExtensions.ToEnumerable<T>(T)

See Also

SelectedDate
DisplayDate
SelectableDateStart
DisplayDateStart
Getting Started
  • Install Now
  • Demos
  • SDK Samples Browser
  • Sample Applications
Support Resources
  • Code Library
  • Knowledge Base
  • MVVM Support
  • Videos
  • GitHub SDK Repository
Community
  • Forums
  • Blogs
  • XAML Feedback Portal
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.