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

# TCustomCalendar.LMChanged

Handles the LCL LM_CHANGED message received when the calendar control is updated.

## Declaration

Source position: calendar.pp line 111

`protected procedure TCustomCalendar.LMChanged(`
`var Message: TLMessage`
`); message;`

## Arguments

`Message` |  | Message handled in the method.

## Description

LMChanged ensures that event handlers are signalled (when assigned) when the value in DateTime is updated for the calendar control is changed. It retrieves the new date value from the widgetset class instance, and compares it to the existing value in DateTime. DecodeDateTime is used to get the year, month, and day component values compared in the method. The new value for DateTime is stored prior to comparing the values.

When the date or one of its component values has been changed, the corresponding event handlers are signalled (when assigned) in the following order:

- OnYearChanged
- OnMonthChanged
- OnDayChanged
- OnChange

An application can assign object procedures to the event handlers to respond to the change notifications.

## See also

TCustomCalendar.DateTime |  | Native data type used for a date value on the calendar control.
TCustomCalendar.OnYearChanged |  | Event handler signalled when the year number in DateTime has been changed using the calendar control.
TCustomCalendar.OnMonthChanged |  | Event handler signalled when the month number in DateTime has been changed using the calendar control.
TCustomCalendar.OnDayChanged |  | Event handler signalled when the day number in DateTime has been changed using the calendar control.
TCustomCalendar.OnChange |  | Event handler signalled when the calendar control has been changed.