New to Telerik UI for .NET MAUIStart a free 30-day trial

.NET MAUI Calendar Header Text Formatting

Updated over 6 months ago

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:

xaml
<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