wDate Property (DateTimePicker Controls)

Applies to TestComplete 14.10, last modified on June 5, 2019

Description

The wDate property specifies the date that is currently selected in the control.

Declaration

TestObj.wDate

Read-Write Property Date/Time
TestObj A variable, parameter or expression that specifies a reference to one of the objects listed in the Applies To section

Applies To

The property is applied to the following objects:

View Mode

This property is available in the Object Browser panel and in other panels and dialogs in both Basic and Advanced view modes.

Property Value

The date that is currently selected in the control.

Remarks

The property works differently for different objects:

  • Win32 DateTimePicker

    The property is useful only if the wIsDateFormat property’s value is True (that is, if the DateTimePicker control displays date). Otherwise, wDate is unchangeable.

    If a check box is displayed next to the date (time) within the control (the wShowCheckbox property is True) and this check box is cleared (the wChecked property is False), retrieving the wDate property’s value causes an error message which is posted to the test log.

    If you set a date that is earlier than wMinDate or later than wMaxDate, wDate is not changed.

  • WPF Toolkit DatePicker

    If you set a date that is earlier than wMinDate, the wMinDate property is set equal to wDate; if you set a date that is later than the wMaxDate property, the wMaxDate property is set equal to wDate.

Note for Flex DateField controls: When you use the wDate property to specify the date in the Flex DateField control, the control's change event does not occur.

Example

To view an example that demonstrates how to use the wDate property, see Obtaining DateTimePicker Date and Time.

See Also

wMinDate Property (DateTimePicker Controls)
wMaxDate Property (DateTimePicker Controls)

Highlight search results