Micro Focus QTP (UFT) Forums

Full Version: Click on calender on specific date.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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.
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