Skip to content

Latest commit

 

History

History
65 lines (39 loc) · 3.22 KB

date-properties.md

File metadata and controls

65 lines (39 loc) · 3.22 KB
title page_title description position slug
Date Properties
.NET MAUI Calendar Documentation - Date Properties
Review all properties for setting the min and max date, selected date, and display date of the Telerik Calendar for .NET MAUI control.
2
calendar-date-properties

.NET MAUI Calendar Date Properties

The .NET MAUI Calendar provides various date properties that allow you to configure the control by setting the display date, restricting the selectable dates, disabling the day names, and more.

Setting the Display Date

To set the currently displayed date, use the DisplayDate property.

  • DisplayDate(DateTime)—Specifies the date that is currently displayed.

Constraining Visible Dates and Selection

To limit the visible dates in the Calendar that the user can select, use the MinDate and MaxDate properties. This allows you to prevent the user from navigating the Calendar to a date outside of the defined date range.

As a result, if the currently selected view contains any dates that are outside of the defined MinDate-MaxDate range, they look disabled.

  • MinDate(DateTime)—Specifies the earliest date that the Calendar can display.
  • MaxDate(DateTime)—Specifies the latest date that the Calendar can display.

For a runnable example with the Calendar Date Properties, see the [SDKBrowser Demo Application]({%slug sdkbrowser-app%}) and go to the Calendar > Features category.

Hiding the Names of the Days

In the Month view, the names of the days of the week are visible by default. You can hide the names by setting the AreDayNamesVisible(bool) property to False.

For a runnable example with the visibility of the names of the days in the Calendar, see the [SDKBrowser Demo Application]({%slug sdkbrowser-app%}) and go to the Calendar > Features category.

Hiding the Leading and Trailing Days

In the Month, Year, Century, and Decade views, the leading and trailing days are visible by default. You can hide them by setting the IsOutOfScopeVisible(bool) property to False.

For a runnable example demonstrating the IsOutOfScopeVisible property, see the [SDKBrowser Demo Application]({%slug sdkbrowser-app%}) and go to the Calendar > Features category.

Setting the First Day of the Week

For half of the world, Monday is the first day of the week, and for the other half, this is Sunday. Use the FirstDayOfWeek property to set the first day of the week in your application.

  • FirstDayOfWeek(enum of type System.DayOfWeek?)—Specifies the day that is considered the beginning of the week.

See Also

  • [Navigation Between the Different Views]({%slug calendar-navigation%})
  • [Specify the Formatting]({%slug calendar-date-formatting%})
  • [Selection modes]({%slug calendar-selection%})
  • [Use exposed Events]({%slug calendar-events%})
  • [Use the exposed Commands]({%slug calendar-commands%})
  • [Define Templates]({%slug calendar-templates-overview%})
  • [Calendar Header Styling]({%slug calendar-header-styling%})