[Overview][Constants][Types][Classes][Procedures and functions][Index] | Reference for unit 'Calendar' (#lcl)

# TCustomCalendar.Date

String representation for the date value on the calendar control.

## Declaration

Source position: calendar.pp line 123

`public property TCustomCalendar.Date : string read GetDate write SetDate stored False;`

## Description

Date is a String property that represents the value in DateTime as a String data type.

Reading the value for the property causes both Date and DateTime to be read from the widgetset class when its handle has been assigned. FormatDateTime is used to convert the date value to a string type using the ShortDateFormat in the DefaultFormatSettings variable. If the widget handle is not available, the member value is used.

Setting a new value in Date causes the value in DateTime to be updated, and the new values are applied to the widgetset class when its handle has been allocated. An EConvertError exception is raised if the new property value is not a valid date using the default format settings.

Use DateTime to read or write the date value using a TDateTime data type.

Use MinDate and MaxDate to set the lower and upper limits for the dates displayed on the calendar control.

## Errors

Raises an EConvertError exception when Date contains an invalid date value.

## See also

TCustomCalendar.DateTime |  | Native data type used for a date value on the calendar control.
TCustomCalendar.MinDate |  | Smallest date value that can entered or selected using the calendar control.
TCustomCalendar.MaxDate |  | Largest date value that can entered or selected using the calendar control.
StrToDate
DefaultFormatSettings
TFormatSettings
EConvertError