Rx TDateEdit

RX Library

Control Name Unit Class
RX TDateEdit ToolEdit TDateEdit

Description:
The TDateEdit is a TEdit field designed for date input. The TDateEdit control has a button so that when you click the button (click event) it pops up a calendar dialog form or calendar (according to CalendarStyle property value) so that you can choose a date.

The calendar form/ popup contains navigation controls (arrows) that responds to the keyboard and allows setting the selected date on the calendar to the next or previous month or year.

Other properties include such as
DefaultToday, DirectInput (validated) and OnExit (after the focus leaves the ComboBox) properties.

The Date property contains the date value displayed in the Edit box. If the property DefaultToday is set to True and the Date property is zero then the current date is assigned to the Date property.

To control whether the year is two or four digits you use a typed boolean constant FourDigitYear from DateUtil unit.


Event OnAcceptDate
Declaration: OnAcceptDate: TExecDateDialog;

The event OnAcceptDate triggers just after the pop-up calendar (or form) is closed. The OnAcceptDate event allows an application to (optionally) validate the date value. The value of the Action parameter (a boolean variable) determines if the application should reject or accept the date specified by the user.


Method CheckValidDate
Declaration: procedure CheckValidDate;

CheckValidDate method checks the date value in the edit control and raises the exception EConvertError if the date in the edit box is invalid or an empty date.


Method GetDateMask
Declaration: function GetDateMask: string;

GetEditMask returns the validation edit mask (or the validation control during data entry). This mask is created according to the current Windows settings and to the FourDigitYears global variable (declared in DateUtil unit).


Property Button
Declaration: Button:
TRxSpeedButton;

This run-time and read-only property provides to direct access to the button in the button edit component (see also: TRxSpeedButton control.)


Property ButtonHint
Declaration: ButtonHint: string;

The ButtonHint property is the text string that specifies the Hint property for the button in a button edit component (TComboEdit and derived).


Property ButtonWidth
Declaration: ButtonWidth: Integer;

This is the width of the button on the right of the DateEdit field. Use this property to specify the width of the button. Set this property to zero value to hide the button in a combo-edit control.


Event OnButtonClick
Declaration: OnButtonClick: TNotifyEvent;

OnButtonClick event occurs whenever the button in a button edit component gets pressed or the user presses the accelerator key specified by ClickKey property. When ButtonWidth = 0 the OnButtonClick events doesn't occur.


Method DoClick
Declaration: procedure DoClick;

The DoClick method simulates a mouse click, as if the user had clicked a button, executing any code attached to the OnButtonClick event.


Property DialogTitle : string
DialogTitle specifies the title of the popup dialog.


Property DefaultToday : boolean
DefaultToday Property specifies whether the date should default as today's date.


Property StartOfWeek : Mon...Sun
StartOfWeek property specifies the starting day (e.g., Monday) for each week.


Property WeekendColour : tColourSet;
WeekendColor specifies the colour the label weekend should be in. (e.g., red colour).


Property Weekends : set
Manipulating weekends property to specify which date should be classified as weekends.


Property Direct Input : boolean

DirectInput property specifies whether the date should be directly input by typing or by selecting the calendar. If the value stored in this variable is true, then the date is directly validated.


Property Date
variable
Date : tDateTime
Variable Datecontains the date which is displayed on the tDateEdit.


Index Page | About | Download
Creation Date: 4 Feb 1998 | Last Update: 16 Mar 2000