Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DXCalendar.DisplayDate Property

Gets or sets a date that allows you to specify the month, year, or decade displayed in the current calendar view. This is a bindable property.

Namespace: DevExpress.Maui.Editors

Assembly: DevExpress.Maui.Editors.dll

NuGet Package: DevExpress.Maui.Editors

#Declaration

C#
public DateTime DisplayDate { get; set; }

#Property Value

Type Default Description
DateTime 2022-09-06T00:00:00.0000000+02:00

The date.

#Remarks

The DisplayDate and ActiveViewType properties allow you to open a specific month, year, or decade in the calendar.

For example, if you set DisplayDate to ‘2024-12-1’ and the ActiveViewType to Month, the calendar displays days of December 2024 (the date’s actual day does not make sense). If you set DisplayDate to ‘2024-1-1’ and ActiveViewType to Year, the calendar displays months of 2024 (the date’s actual month and day do not make sense in this case). If you set DisplayDate to ‘2024-1-1’ and ActiveViewType to Decade, the calendar displays the 2020-2029 decade.

You can also use the combination of the DisplayDate and ActiveViewType properties to determine the period that is currently displayed in the calendar.

#Example

The code below shows how to display a specific decade in the calendar.

DevExpress Calendar - Specific View and Year

<dxe:DXCalendar DisplayDate="2034-1-1"
                ActiveViewType="Year"/>
See Also