Set value into DateTimePicker with wDate doesn't work
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is wDate a string format object or a date format object? Right now you are giving it a string value.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
it is string format. my value is "2020-14-01"
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
