Unit 'EditBtn' Package
[Overview][Constants][Types][Classes][Procedures and functions][Index] [#lcl]

TDateEdit.SetDateMask

Applies an EditMask based on the DateOrder for the control.

Declaration

Source position: editbtn.pas line 628

protected procedure TDateEdit.SetDateMask; virtual;

Description

SetDateMask is a method used to update the EditMask for the control. It also updates the internal member where a FormatDateTime-compatible format string is stored. The mask value is determined by the DateOrder property, and uses the following TDateOrder and edit mask values:

doNone
EditMask is set to an empty string (''). The date format string is also an empty string.
doDMY, doMDY
EditMask is set to '99/99/9999;1;_'. The date format string is set to 'mm/dd/yyyy' (for doMDY) or 'dd/mm/yyyy' (for doDMY).
doYMD
EditMask is set to '9999/99/99;1;_'. The date format string is set to 'yyyy/mm/dd'.

SetDateMask retrieves and re-applies the current value in Date after the EditMask has been changed. This forces the display value in Text to be updated.

SetDateMask is called when a new value is assigned to the DateOrder property.

See also

TDateEdit.DateOrder

  

Controls the display order for Year, Month, and Day parts of the Date value.

TDateEdit.Date

  

Contains the TDateTime value for the control.

TCustomAbstractGroupedEdit.EditMask

  



CT Web help

CodeTyphon Studio