Skip to main content

TcxDBDateEdit Class

Represents a data-aware edit control with a dropdown calendar that enables editing date values.

Declaration

TcxDBDateEdit = class(
    TcxCustomDateEdit
)

Remarks

The TcxDBDateEdit control allows editing the contents of a datetime dataset field. Similar to other ExpressDBEditors the TcxDBDateEdit class allows managing various attributes via the Properties property. These attributes include the input kind, buttons and the savetime feature.

In addition to entering dates via the dropdown calendar, a date editor allows a user to enter dates within an edit box in a number of ways depending on the Properties.InputKind property. The following table lists some of the possible formats recognized by a date editor in a system with default English (United States) regional settings.

InputKind value

Examples of dates

ikStandard

01/31

01/31/2002

9-Aug

August/09/2002

Smart input strings:

today; tomorrow; Sunday; now; bom

today–7; now+3

ikMask

01/31/2002

ikRegExpr

01/31/2002

Aug/09/2002

Smart input strings:

today; tomorrow; Sunday; now; bom

today–7; now+3

If the year is omitted in the ikStandard mode, the current year is assumed. The syntax in the ikRegExpr mode supports the auto-completion function. Also validation is performed and this restricts the user input.

Smart input strings are described in the SmartTextToDate topic. See the Using SmartTextToDate Function section to know how to expand possible constants.

Use the Style, StyleDisabled, StyleFocused and StyleHot properties to adjust the look & feel of an editor in various control’s states. Working with styles is discussed in the TcxCustomEditStyle class topic.

To connect a data-aware control to a dataset, it is necessary to set the DataSource and DataField properties of the DataBinding object.

See Also