DateButtons Property

Applies to TestComplete 14.0, last modified on January 23, 2019

Specifies a collection of flags that affect the visibility of date buttons.

Declaration

componentPropObj.DateButtons
Read-Write Property String
componentPropObj     One of the objects listed in the Applies To section  

Applies To

This property applies to the following objects:

TcxDateEditProperties

Description

The drop-down window of the TcxDateEdit component can display several date buttons. The DateButtons property provides access to a collection of flags that determine which buttons are displayed.

Property Value

A string containing the button flag values separated by spaces or commas and optionally enclosed in square brackets. The property value is the combination of the following values:

Value Button Name Action
btnClear Clear Clears the current value of the editor. Assigns an empty value to the EditValue property and -700000 to the Date property.
btnNow Now Sets the current date and time.
btnToday Today Sets the current date only.

By default, the DateButtons property is a combination of btnClear and btnToday.

When setting the DateButtons property from the User Forms editor, you should set the needed property flags of the DateButtons property to True and other flags to False.

When you obtain the value of the DateButtons property from scripts, the values are separated by commas. For example, if DateButtons were not changed, the DateButtons property will return “btnClear,btnToday”.

When you set the DateButtons property value from scripts, you should separate values by commas or spaces and you can optionally enclose the string in square brackets. For example, all of the following variants are equivalent and valid:

UserForms.MyForm.TOpenDialog.DateButtons = "btnClear,btnToday";
UserForms.MyForm.TOpenDialog.DateButtons = "btnClear btnToday";
UserForms.MyForm.TOpenDialog.DateButtons = "btnClear, btnToday";
UserForms.MyForm.TOpenDialog.DateButtons = "[btnClear,btnToday]";
UserForms.MyForm.TOpenDialog.DateButtons = "[btnClear btnToday]";
UserForms.MyForm.TOpenDialog.DateButtons = "[btnClear, btnToday]";

Highlight search results