I foubd out a way to resolve this. Actually even though the SetDate method was selecting the specified date in the SwfCalendar control it was not displaying it. When the user clicked on the control it displayed the date which was set and again on pressing escape it displayed the date. My application has F4 as the function key when the focus is on the SwfCalendar control. Not sure if it is a standard one.
So there are two solution if somebody encounters such problem.
Solution 1:
After the SetDate method use Type for the shortcut key (F4) in my case and then use Type for Esc key to close the calendar as below
Solution2:
Get the Height and width of the SwfCalendar control using the GetRoProperty method and then click on the control twice to open and display the date. But this may need some trial an error to find the x, y coordinates to be clicked
height=
height=height/2
width=
width = width -10
Regards
Shiva
So there are two solution if somebody encounters such problem.
Solution 1:
After the SetDate method use Type for the shortcut key (F4) in my case and then use Type for Esc key to close the calendar as below
Code:
SwfWindow("Window1").SwfWindow("Window2").SwfCalendar("dtpMeetingStartDate").SetDate "21-May-2009"
SwfWindow("Window1").SwfWindow("Window2").SwfCalendar("dtpMeetingStartDate").Type micF4
SwfWindow("Window1").SwfWindow("Window2").SwfCalendar("dtpMeetingStartDate").Type micEsc
Get the Height and width of the SwfCalendar control using the GetRoProperty method and then click on the control twice to open and display the date. But this may need some trial an error to find the x, y coordinates to be clicked
height=
Code:
SwfWindow("Window1").SwfWindow("Window2").SwfCalendar("dtpMeetingStartDate").GetROProperty "Height"
height=height/2
width=
Code:
SwfWindow("Window1").SwfWindow("Window2").SwfCalendar("dtpMeetingStartDate").GetROProperty "Width"
width = width -10
Code:
SwfWindow("Window1").SwfWindow("Window2").SwfCalendar("dtpMeetingStartDate").Click (width, height)
SwfWindow("Window1").SwfWindow("Window2").SwfCalendar("dtpMeetingStartDate").Click (width, height)
Regards
Shiva