Classes and types used to implement TCalendar, a graphic control allowing selection of a date from a calendar display Enumerated type with values that control display settings in TCalendar

TDisplaySetting is an enumerated type with values that control display settings in TCalendar. Values from TDisplaySetting are stored in the TDisplaySettings type.

Displays a month/year heading Displays day names Prevents changing the current month Displays week numbers Display days starting with Monday (instead of Sunday) Set type for TDisplaySetting values

TDisplaySettings is a set type used to store enumerations values from TDisplaySetting.

Default display settings used in TCalendar

DefaultDisplaySettings is a constant with the default display settings used in TCalendar. DefaultDisplaySettings contains the following values:

dsShowHeadings
Displays the month/year heading
dsShowDayNames
Displays day names
Indicates where a mouse click occurred in a calendar control

TCalendarPart is an enumerated type with values that indicate where a mouse click occurred in a calendar control. TCalendarPart is used to implement the TCalendar.HitTest method.

TCalendar.HitTest
Mouse click cannot be applied to the control; no handle available Mouse click occurred on a date in the calendar control Mouse click occurred on a week number in the calendar control Mouse click occurred on a day heading in the calendar control Mouse click occurred on a navigation button in a calendar control Mouse click occurred on the month name heading in the calendar control Mouse click occurred on the year number heading in the calendar control Defines the view for a calendar

TCalendarView is an enumeration type with values that define the view for a calendar control. TCalendarView makes it possible to set the calendar view introduced in Windows Vista or later. In other widgetsets, as well as in older versions of Windows, a calendar has only a standard "month view" grid with days representing a month. TCalendarView is used to implement the TCalendar.GetCalendarView method.

Grid has days for one month Grid has months in one year Grid has years from one decade Grid has decades for one century EInvalidDate is an exception raised for an invalid date

EInvalidDate is an exception raised when a invalid date is selected in a calendar control.

TCustomCalendar - base class for TCalendar

TCustomCalendar is the base class for TCalendar, a graphic control for selecting a date.

Gets the value for the DateTime property Value for the DateTime property Sets the value for the DateTime property New value for the DateTime property Gets values for properties in the calendar control Sets values for properties in the calendar control Gets the value for the DisplaySettings property Value for the DisplaySettings property Sets the value for the DisplaySettings property New value for the DisplaySettings property Gets the value for the Date property Value for the Date property Sets the value for the Date property New value for the Date property LMChanged - LCL Message method to deal with changes in the control LMMonthChanged - LCL Message method for change in Month LMYearChanged - LCL Message method for change in Year LMDayChanged - LCL Message method for change in Day Create - constructor for TCustomCalendar

Create is the constructor for TCustomCalendar. Create calls the inherited Create method, and sets the style, initial bounds, and display settings for the calendar. Create sets the default date and time value to Now.

TWinControl.Create
Owner of the class instance Indicates where a mouse click occurred in the calendar control

HitTest is a TCalendarPart function that indicates where a mouse click occurred in the calendar control. The return value indicates the part of the control clicked, or cpNoWhere when the handle has not been allocated for the control. HitTest ensures that the widget-set specific HitTest method is called.

Coordinates where the mouse click occurred Gets the current view for the Calendar Current view for the Calendar Date is a string representation of the DateTime value

Date is a String property that represents the value in DateTime as a string data type. Reading the value in Date calls the GetProps method to get the current value for DateTime, and converts it to its string representation. Setting the value in Date calls the SetProps method to store the new value for both Date and DateTime.

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

Native data type used for a date in the calendar control

DateTime is a TDateTime property that contains the native data type used for a date in the calendar control. Reading the value in DateTime calls the GetProps method to get the current values for Date and DateTime. Setting the value in DateTime calls SetProps to update the values in Date and DateTime.

For the Windows environment, the CalendarMinDate and CalendarMaxDate member variables are updated to ensure that date values are in an acceptable date/time value range. An EInvalidDate exception is raised if the value is not a valid date/time for the platform.

The calendar control does not use the time portion of the TDateTime data type. The time value is not significant unless a specified value is not valid for the date/time data type.

EInvalidDate exception is raised if the value is not a valid date/time for the platform; raised with the message rsInvalidDateRangeHint.

DisplaySettings contains options which control the appearance of the calendar

DisplaySettings contains options which control the appearance of the calendar. DisplaySettings is a set type which contains zero or more TDisplaySetting values, including:

dsShowHeadings
Displays a Month/Year heading
dsShowDayNames
Displays Day names
dsNoMonthChange
Prevents changing the month
dsShowWeekNumbers
Displays week numbers
dsStartMonday
Days are ordered starting with Monday instead of Sunday
OnChange - event handler for any change in Calendar

OnChange is a TNotifyEvent property that represents the event handler signalled when the date/time value for the control has changed. OnChange is signalled from the LMChanged, LMDayChanged, LMMonthChanged, and LMYearChanged methods. Applications should assign a procedure to the event handle to respond to the message notification.

OnDayChanged - event handler for a change in Day selected

OnDayChanged is a TNotifyEvent property that represents the event handler signalled when the day number in the date/time value for the control has changed. OnDayChanged is signalled from the LMDayChanged method. Applications should assign a procedure to the event handler to respond to the message notification.

OnMonthChanged - event handler for a change in month selected

OnMonthChanged is a TNotifyEvent property that represents the event handler signalled when the month in the date/time value for the control has changed. OnMonthChanged is signalled from the LMMonthChanged method. Applications should assign a procedure to the event handler to respond to the message notification.

OnYearChanged - event handler for a change in the year selected

OnYearChanged is a TNotifyEvent property that represents the event handler signalled when the year in the date/time value for the control has changed. OnMonthChanged is signalled from the LMYearChanged method. Applications should assign a procedure to the event handler to respond to the message notification.

TCalendar allows selection of a date from a calendar display

TCalendar is a graphic control allowing the user to select a date from a calendar display.