Sean Shao's Calendar Widget

Chipp Walters chipp at chipp.com
Sat Aug 6 20:18:30 EDT 2011


Charles,

The wrapper makes it easy to call the calendar widget with a single function
call. Please check the dialogdata AFTER the dialog is dismissed, and put
your biz logic there, not in the OK or any other button on the widget.

On Sat, Aug 6, 2011 at 11:07 AM, Charles Szasz <cszasz at mac.com> wrote:

> 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
>
>
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



-- 
Chipp Walters
CEO, Shafer Walters Group, Inc.



More information about the use-livecode mailing list