Re: Not able to Set date in Silverlight Calendar in QTP (451 Views)
Reply
Occasional Visitor
Shashank_Verma
Posts: 2
Registered: ‎08-20-2013
Message 1 of 4 (465 Views)

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

 

 

HP Expert
vzamoraz
Posts: 502
Registered: ‎04-12-2012
Message 2 of 4 (451 Views)

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
Shashank_Verma
Posts: 2
Registered: ‎08-20-2013
Message 3 of 4 (445 Views)

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

HP Expert
vzamoraz
Posts: 502
Registered: ‎04-12-2012
Message 4 of 4 (432 Views)

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

 

Try this format:

 

12-25-2008  or 25-12-2008

The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.