Unified Functional Testing (formerly QTP) News and Support Forum
Showing results for 
Search instead for 
Do you mean 

Not able to Set date in Silverlight Calendar in QTP

Occasional Visitor

Not able to Set date in Silverlight Calendar in QTP

Hi,

 

i am unable to enter date having year=2008 in silverlight calendar.

 

if the DOB of 1 st member in the datetable is having Year=2008,than it is accepting it as it is. But if

DOB=2008 appears in forthcoming members than it is taking it as 1008 in place of 2008.

 

This issue is showing up for DOB having Year>2000

 

i tried entering  12/25/2008, and it showed up as 12/25/1008.

 

Please help me out with this issue.

 

The code statement which  i used :

 

Browser("Cgx HomePage").Page("Cgx HomePage").SlvWindow("LoadingPage").SlvCalendar("DateofBirthDatePicker").Type dob

 

 

3 REPLIES
Highlighted
HPE Expert

Re: Not able to Set date in Silverlight Calendar in QTP

Hi,

 

   Did you try Browser("Cgx HomePage").Page("Cgx HomePage").SlvWindow("LoadingPage").SlvCalendar("DateofBirthDatePicker").setDate  dob

 

 

 

If you find that this or any post resolves your issue,  mark it as an accepted solution and make sure to "Kudos" on the left 

Thank you very much

 

 

 

Occasional Visitor

Re: Not able to Set date in Silverlight Calendar in QTP

I tried using SetDate method of SlvCalendar But it is showing me error.

 

 

System.FormatException : Wrong Date Format

HPE Expert

Re: Not able to Set date in Silverlight Calendar in QTP

 

Try this format:

 

12-25-2008  or 25-12-2008