Forum OpenACS Q&A: Re: assign variables from javascript to openacs

Collapse
Posted by Saskia J. on
In addition to that I searched around the forum and found some postings about a popup calendar:
https://openacs.org/forums/message-view?message_id=242525

But where can I find that widget?

Collapse
Posted by Ryan Gallimore on
Hi Sasika,

You can attach the OpenACS showCalendar function to a button and ask it to populate a textbox.

I'll use the recommended ad_form Tcl procedure to build the form:

ad_form -name calendar -form {
{start_date:text(text)}
{popup_cal:text(button)
{value " ... "}
{html {onClick "return showCalendar('start_date', 'ymd');"}}
}
}
...

For the showCalendar JS code, see /packages/acs-subsite/www/resources/core.js

For more info on ad_form, see this guide.