New to Telerik UI for .NET MAUI? Start a free 30-day trial

.NET MAUI Calendar Header Text Formatting

The .NET MAUI Calendar allows you to specify the format of the header label text in the different display modes. The format must be a valid date format. The available options for the header label text formatting are:

  • MonthHeaderTextFormat(string)—Specifies the format of the header text when the Calendar DisplayMode is Month.
  • YearHeaderTextFormat(string)—Specifies the format of the header text when the Calendar DisplayMode is Year.
  • DecadeHeaderTextFormat(string)—Specifies the format of the header text when the Calendar DisplayMode is Decade.
  • CenturyHeaderTextFormat(string)—Specifies the format of the header text when the Calendar DisplayMode is Century.

Header Text Format Example

The following example demonstrates how to define a Calendar and format the header text with the MonthHeaderTextFormat, YearHeaderTextFormat, DecadeHeaderTextFormat, and CenturyHeaderTextFormat properties:

<telerik:RadCalendar MonthHeaderTextFormat="{}{0:yy MMMM}"
                     YearHeaderTextFormat="{}{0:yy} year"
                     DecadeHeaderTextFormat="{}from {0:yy} to {1:yy}"
                     CenturyHeaderTextFormat="{}from {0:yy} to {1:yy}" />

.NET MAUI Calendar Header Text Formatting

See Also

In this article