Ask a Question

Set value into DateTimePicker with wDate doesn't work

tuanvinh1008
Contributor

Set value into DateTimePicker with wDate doesn't work

Hi all,

In my application, there are some DateTimePicker controls and I tried to use .wDate for setting value into that control but it doesn't work, nothing to fill this control. Do we have any other way to handle it? Here is my code

 

function Test1()
{
//Sets the date '14/01/2020' in the 'dateTimePicker' date/time picker.
Aliases.BPXXXX.BCValueDate.dateTimePicker.wDate = "14/01/2020";
}

 

thanks,

Vinh

5 REPLIES 5
Marsha_R
Champion Level 3

Is wDate a string format object or a date format object?  Right now you are giving it a string value.

it is string format. my value is "2020-14-01"

Hi @tuanvinh1008 - 

 

Have you tried using a keys or a SetText? You do not have to use a date specific method in this case. 

 

Emma

@ebarbera 

Hi, Don't have SetText method in this control.

Try recording a short test where you pick the date and see what code TestComplete gives you for doing this.  Then try running that test again to make sure it works.

cancel
Showing results for 
Search instead for 
Did you mean: