Micro Focus QTP (UFT) Forums
problem with date set with SwfCalendar - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: problem with date set with SwfCalendar (/Thread-problem-with-date-set-with-SwfCalendar)



problem with date set with SwfCalendar - franc29 - 06-16-2009

I am having a problem with SwfCalendar object. I am using the version 9.5 of QTP (it has the .NET 3.5) and during an automation. I am trying to change start and end date of form in application written in C#. My .net adding are correctely loaded. But these 2 functions:
Code:
-SwfWindow("Product Catalog Manager").SwfWindow("Service Wizard").SwfCalendar("dtpStartDate").SetDate "30-Jul-2009"
-SwfWindow("Product Catalog Manager").SwfWindow("Service Wizard").SwfCalendar("dtpEndDate").SetDate "15-Jun-2009"

are not actually changing the date in the form I an trying to automate. Is there something wrong with this code?

help needed.

Much Appreciated.


RE: problem with date set with SwfCalendar - ursvinod - 06-17-2009

Try this

Code:
SwfWindow("Product Catalog Manager").SwfWindow("Service Wizard").SwfCalendar("dtpEndDate").SetDate Date
' sets the current date

let me know if this works...


RE: problem with date set with SwfCalendar - franc29 - 06-18-2009

Thank you for your reply
but it doesn't work because I want to set a particular date not today's date. I found a way to make work by cliking on the date first


RE: problem with date set with SwfCalendar - ursvinod - 06-18-2009

How about this...

Code:
SwfWindow("Product Catalog Manager").SwfWindow("Service Wizard").SwfCalendar("dtpEndDate").Type "30-Jul-2009"

Hope this works...


Thanks
Vinod