Sean Shao's Calendar Widget

Charles Szasz cszasz at mac.com
Sat Aug 6 12:07:36 EDT 2011


Chipp's wrapper for Sean Shao's calendar widget is great! I was able to use it to call it and insert a date into a field. But I do have a question about using it in multiple fields.

This is the script I am using in the OK button of the calendar widget:

on mouseUp
   set the dialogdata to line 1 of fld "log"
   
   if dialogdata is not empty
   then
      put item 2 of dialogdata into t --->month
      put "/" after t
      put item 3 of dialogdata after t --->day
      put "/" after t
      put item 1 of dialogdata after t --->year

      put t into field "date1" of stack "mileage report"
      
      close this stack
   end if
   
end mouseUp

I tried using selectedField in my script in the OK button of the calendar widget above but that did not work:

if selectedField of card "1" stack "mileage report" = field "date2" of card "1" of stack "mileage report"
      then
         put t into field "date2" of card "1" of stack "mileage report"
      else
         answer "It did not work!"
      end if

Any suggestions on how I can resolved this dilemma?      

Thanks for your time!

Charles Szasz
cszasz at mac.com







More information about the Use-livecode mailing list