Hello,
I currently have problems with the "click" event of the DateChooser in
connection with its shownMonth and shownYear properties.
I want the application the react when the users changes the shown Month,
either by using the arrows above the Calendar or by clicking on one of
the grey days of the month before or after the current one.
Unfortunately the EventListener is not working as it should.
Here's the code:
cal = new qx.ui.component.DateChooser();
cal.auto();
cal.setDate(new Date());
var currentMonth = cal.getShownMonth();
var currentYear = cal.getShownYear();
this.debug("Month " + cal.getShownMonth() + ", " + cal.getShownYear());
cal.addEventListener("click", function calSelect(e) {
if (currentMonth != cal.getShownMonth() || currentYear !=
cal.getShownYear()) {
currentMonth = cal.getShownMonth();
currentYear = cal.getShownYear();
this.debug("Month changed " + currentMonth + ", " +
currentYear);
}
});
Using the arrows to select another month seems to work always, using the
grey days to navigate seems only to work sometimes, when the change of
the month forces the widget to select another date.
To me it seems that there is a bug in the Calendar widget - or am I
doing something wrong?
The only possible workaround that I see now is to only react to selected
dates by using the "select" event listener, but that would be a poor
solution when it comes to usability.
Can I somehow deactivate the feature that the month gets changed through
a grey-day-click so that changing the month is only possible by using
the arrows? This would still be a better compromise than using the
select event.
Thanks for the help.
Regards,
Daniel Haferkorn
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel