[]
        
(Showing Draft Content)

Format

The CalendarView control supports date formats, such as CaptionFormat and TodayFormat. Both the formats are explained in detail with code snippets in the following sections:

Caption Format

The C1CalendarView class provides the CaptionFormat property to set a format for the calendar caption.

The code snippet below shows how to set a caption format:

// Set format for caption of calendar
calendarView.CaptionFormat = "M yyyy";

Today Format

CalendarView lets you to set a format to display the Today button according to your requirement. For this purpose, the C1CalendarView class provides the TodayFormat property.

This property lets you add the text as well as date format. The date format is defined using the curly braces as shown in the code snippet.

// Set text for Today's button
calendarView.TodayFormat = "&Today's date is: {dd MMM yyyy}";

The resulting output will look like the image below: