ComponentOne Calendar for ASP.NET: Calendar Appearance > Calendar Title Settings

Calendar Title Settings

CalenderTitle is the group title shared by all the month views. To change the title for month views, use the MonthViewTitle property. The title string can be any string or string that has date formatting parameters. At most four parameters are accepted, each can have its own data format, which are the following:

Parameter

Description

{0}

The value of the DisplayDate property.

{1}

The first month, when multiple months are displayed.

{2}

The last month, when multiple months are displayed.

{3}

The number of month views, when multiple months are displayed.

Multiple Calendar View Presentation

When you create a multiple calendar view presentation you may want to change the text for the Title that appears at the top of the calendar control.

Setting the CalendarTitle and MonthViewTitle properties to a standard or custom date format string will format the data entered into the property. You can also select from one of the Custom Date format string converters. The following table lists and describes the Custom Date format string converters provided for the CalendarTitle and MonthViewTitle properties:

 

Custom String Converter

Description

Example

{0:MMMM yyyy}

The default DateTime format string. This displays a single full calendar month name with the current year following.

If the current month shown was January, then the Calendar Title would display the following: January 2007

{0:MM-yyyy}

Displays the integer value for the current month shown on the calendar and displays a dash with the current year of the calendar displayed.

If the current month shown was January, then the Calendar Title would display the following: 01-2007

{1:MMM yyyy}---{2:MMM yyyy}

Displays the abbreviated name and current calendar year for the start and end calendar month when there are two or more calendar months shown. A dash separates the start and end calendar month.

If the following months were displayed on the calendar: January, February, March, and April then the Calendar Title would display the following: Jan 2007 – Apr 2007.

{1:MMMM yyyy}---{2:MMMM yyyy}

Same as the preceding converter, except that it displays the full name of the calendar months.

If the following months were displayed on the calendar: January, February, March, and April then the Calendar Title would display the following: January 2007 – April 2007.


Send comments about this topic to ComponentOne.
Copyright © 1987-2010 ComponentOne LLC. All rights reserved.