Micro Focus QTP (UFT) Forums
Click on calender on specific date. - 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: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: Click on calender on specific date. (/Thread-Click-on-calender-on-specific-date)



Click on calender on specific date. - venkatesh9032 - 06-12-2015

I had a calender in application
i will send parameter year,month and date based on the parameters the date should be selected in the calender icon.

can any one provide syntax.


//my calendar icon looks like windows calendar.desktop righside bottom.


RE: Click on calender on specific date. - nistalaramesh - 12-02-2015

I have a function in my script where the calendar dates are in a web table. (Its an Ajax control)
In my function i will pass web table name, Date that's it it will click on the mentioned date.
Hope this might be helpful to you.


Code:
Public Function DateSelect(Temptable,Dt)
Tempflag = False
For r = 2 to Temptable.RowCount
For c = 2 to Temptable.ColumnCount(r)
      temp = Temptable.GetCellData(r,c)
If (strcomp(Trim(DataTable.Value("SiteVisitDate", DtlocalSheet)), temp, 1) = 0) Then
Temptable.ChildItem(r,c,"Link",0).Click
Tempflag = True
               Exit for
End If
Next

If Tempflag Then
Exit for
End If

Next
 
End Function