I have a field that when a user clicks on it a calendar picker stack appears to let the user click on a date. The field is locked to allow the mouseUp to work. The script below works fine when the user clicks on the field. The date is selected from the popup and put into the field.

It is also possible for the user to tab into the field from the previous field so I added the focusIn handler. If I uncomment "click at the loc of me" the calendar stack shows up but when the user selects the date it doesn't go into the field.

How do I get both to work?

on mouseUp
  put "SmallCalendar" into tStackName
  put me into theDate
  put theDate into theOldDate
  convert theDate from short system date to short English date
  put getDate(theDate, tStackName) into theDate
  if theDate is theOldDate then exit to top
  if theDate is "clear" then
    put empty into me
  else
    convert theDate from short English date to short system date
    put theDate into me
  end if
  closeField
end mouseUp

on focusIn
--  click at the loc of me
end focusIn

Bill Vlahos
_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to