SelectDate Action (Specific to YUI 2 Calendar Controls)

Applies to TestComplete 15.64, last modified on June 12, 2024
This method is not supported in web tests (including cross-platform web tests) that use XPath expressions and CSS selectors to locate web elements. This method can be only used in tests that locate web objects by using internal identification properties provided by TestComplete.


Use the SelectDate action to select or unselect the specified date in the calendar control.


TestObj.SelectDate(Date, Select)

TestObj A variable, parameter or expression that specifies a reference to one of the objects listed in the Applies To section
Date [in]    Required    Date/Time    
Select [in]    Optional    Boolean Default value: True   
Result None

Applies To

The method is applied to the following object:

View Mode

To view this method in the Object Browser panel and in other panels and dialogs, activate the Advanced view mode.


The method has the following parameters:


Specifies the date to be selected.


Specifies whether the date will be selected (True) or unselected (False).

Result Value



If the Date parameter value is empty (Nothing in VBScript, null in JavaScript, JScript, C++Script and C#Script, None in Python, nil in DelphiScript), all the dates selected in the control are unselected.

If the date specified by the Date parameter is later (or earlier) than the date specified by the wMaxDate (or wMinDate) property, the selection is not changed and an error message is posted to the test log.

See Also

wMaxDate Property (Specific to YUI 2 Calendar Controls)
wMinDate Property (Specific to YUI 2 Calendar Controls)

Highlight search results