Skip to content

DayHeaderFormatLong Property

See also: CalendarWeekView Object

Description

Custom long date format string used for day headers.

Property type

Read-write property

Syntax (Visual Basic)

Public Property DayHeaderFormatLong() As String

Remarks

Long, Middle, Short and Shortest format strings are used for different header widths in the Calendar. The control automatically selects the longest date format string that can be drawn within the currently active day header width.

"Day header" refers to the caption above each day that indicates the day, month, and year. The day header is displayed differently depending on the current view; the longest possible date format that fits will be displayed. This updates automatically if the size of the days changes (for example, when resizing the window).

By default the format strings use the locale settings from the computer. Use the DayHeaderFormatXXX properties to customize the defaults.

Example

Format Day Header Date String Sample (Visual Basic)

' ddd   - Short day of the week (Mon...Sun)
' dd    - Day of the month with leading zero (01...31)
' d     - Day of the month without leading zero (1...31)
' MMMM  - Full month name (January...December)
' MMM   - Short month name (Jan...Dec)
' MM    - Month in numeric format (01...12)
' yyyy  - Full year (2005, 2006, etc.)
' yy    - Abbreviated year (05, 06, etc.)

CalendarControl.ActiveView.DayHeaderFormatLong     = "ddd, dd MMMM yyyy"
CalendarControl.ActiveView.DayHeaderFormatMiddle   = "ddd, dd MMM yy"
CalendarControl.ActiveView.DayHeaderFormatShort    = "dd MMM"
CalendarControl.ActiveView.DayHeaderFormatShortest = "dd.MM"

CalendarControl.Populate

See Also


Copyright (c) 1998-2024 Codejock Technologies. All rights reserved.