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

TDateEdit.MaxDate

Largest date value allowed in the date edit control.

Declaration

Source position: editbtn.pas line 649

published property TDateEdit.MaxDate : TDateTime
  read FMaxDate
  write SetMaxDate
  stored GetMaxDateStored;

Description

MaxDate is a TDateTime property which indicates the largest value allowed in the Date property. Along with MinDate, it defines a range limit for possible Date values in both the edit control and the pop-up calendar form displayed when its Button is clicked.

The default value for the property is an empty date/time value (0.0), and indicates that neither MinDate nor MaxDate are used to limit the values in Date. Setting a new value for the property causes the date value to be validated. It must be in the range of valid TDateTime values defined in the RTL MinDateTime and MaxDateTime constants. An EInvalidDate exception is raised if the new value is outside the allowed range.

The value in Date is adjusted (when needed) if its value is larger than the new value for the MaxDate property. No actions are needed if MinDate and MaxDate have not been assigned, or are not at least one day apart.

Time component values (hours, minutes, seconds, milliseconds) in MaxDate are ignored in TDateEdit.

Use MinDate to specify the smallest value allowed in the Date property.

Remark: MinDate and MaxDate are not implemented for all platforms supported in the LCL. Specifically, GTK2 and GTK3 do not implement MinDate and MaxDate in their native calendar controls.

See also

TDateEdit.Date

  

Contains the TDateTime value for the control.

TDateEdit.MinDate

  

Smallest date value allowed in the date edit control.

TDateEdit.DoDateRangeCheck

  

Signals the OnDateRangeCheck event handler (when assigned).

EInvalidDate

  

Exception raised for an invalid date in the calendar control.

MinDateTime

MaxDateTime


Version 4.0 Generated 2025-05-03 Home