Changed default display formatting to make a zero datetime
blank, instead of "12/30/1899".
Changed the default dropdown behaviour to make a zero date
calendar page to Today, instead of December 1899.
Added the DefaultDate property to specify a different
calendar default to show for zero dates. (A DefaultDate value of zero is
interpreted as Today).
Added several new properties to allow custom display
formatting of dates and times:
The DateFormatString and DateFormatZero properties are
used to define custom display formats for non-zero and zero values.
When DateFormatString is empty, the default dfShort or
dfLong or dtkTime format is set, using the Delphi date and time formatting
variables in SysUtils.
When DateFormatZero is empty, zero dates are displayed as
The OnFormatDate event can also be used to inspect the
display value and to supply a custom formatting string.
Refer to the latest Microsoft SDK documentation for
complete description of formatting strings. The following is an extract
from the SDK:
Date and time format elements will be replaced by the actual date and time. They are defined by the following groups of characters:"d" The one- or two-digit day.
"dd" The two-digit day. Single-digit day values are preceded by a zero.
"ddd" The three-character weekday abbreviation.
"dddd" The full weekday name.
"h" The one- or two-digit hour in 12-hour format.
"hh" The two-digit hour in 12-hour format. Single-digit values are preceded by a zero.
"H" The one- or two-digit hour in 24-hour format.
"HH" The two-digit hour in 24-hour format. Single-digit values are preceded by a zero.
"m" The one- or two-digit minute.
"mm" The two-digit minute. Single-digit values are preceded by a zero.
"M" The one- or two-digit month number.
"MM" The two-digit month number. Single-digit values are preceded by a zero.
"MMM" The three-character month abbreviation.
"MMMM" The full month name.
"t" The one-letter AM/PM abbreviation (that is, AM is displayed as "A").
"tt" The two-letter AM/PM abbreviation (that is, AM is displayed as "AM").
"yy" The last two digits of the year (that is, 1996 would be displayed as "96").
"yyyy" The full year (that is, 1996 would be displayed as "1996"). To make the information more readable, you can add body text to the format string by enclosing it in single quotes. Spaces and punctuation marks do not need to be quoted. Note: Nonformat characters that are not delimited by single quotes will result in unpredictable display.For example, to display the current date with the format "Today is: 04:22:31 Tuesday Mar 23, 1996", the format string is "'Today is: 'hh':'m':'s dddd MMM dd', 'yyyy". To include a single quote in your body text, use two consecutive single quotes. For example, "'Don''t forget' MMM dd',' yyyy" produces output that looks like: Don't forget Mar 23, 1996. It is not necessary to use quotes with the comma, so "'Don''t forget' MMM dd, yyyy" is also valid, and produces the same output.