As a follow-up, you have to do a little more work if your text field
and image objects are not visible on screen when window.application.post
fires (for example, if the widgets are on a non-active page of a
QxBarView).
To handle this, add an event listener to imgCal so that when it first
appears, you can set up the calendar, like this:
window.application.main = function()
{
// rest of init code deleted...
imgCal.addEventListener("appear", on_imgCal_appear);
// rest of init code deleted...
}
// use a variable to ensure that you only initialize the
// calendar once
var calendar_init = false;
function on_imgCal_appear (e)
{
if (calendar_init)
{
return;
}
Calendar.setup({
inputField : "f_date_b", // id of the input field
ifFormat : "%m/%d/%Y %I:%M %p", // format of the input
field
showsTime : true, // will display a time selector
button : "f_trigger_b", // trigger for the calendar
(button ID)
singleClick : false, // double-click mode
step : 1 // show all years in drop-down boxes (instead
of every other year as default)
});
calendar_init = true;
}
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642_______________________________________________
Qooxdoo-devel mailing list
Qooxdoo-devel@...
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel