When I tried to use the click event it fired when I clicked on the arrows to change the month or year. You might take a closer look at that.

Jim


On 10/2/06, Mike Crowe <[EMAIL PROTECTED]> wrote:
Thanks, David,

I ended up using:

        // Create the Calendar under the tree
        var chooser = new qx.ui.component.DateChooser;
        chooser.auto();
        chooser.setWidth("100%");
        dock.add(chooser);

        chooser.addEventListener(qx.constant.Event.CLICK,function() {
                moduleTime2Do.setNewDate( this.getDate() );
        });

which seemed to do what I wanted (single click change, etc.)

On 10/2/06, dperez <[EMAIL PROTECTED]> wrote:
>
> Here is a sample snippet (a field text that shows a date, a button that
> allows to change the date):
>
> var fld = new qx.ui.form.TextField;
> var btn = new qx.ui.form.Button("...");
> btn..addEventListener('execute', function() {
>         var cp = new qx.ui.component.DateChooser ;
>         cp.setBorder(null);
>         cp.setDate(strToDate(fld.getValue(), true));
>         cp.auto();
>         cp.addEventListener(qx.constant.Event.SELECT, function() {
>                 fld.setValue((new
> qx.util.format.DateFormat('dd-MM-yyyy')).format(cp.getDate()));
>                 vnt.close();
>                 fld.focus();
>         });
>         var vnt = new qx.ui.window.Window ("Date chooser");
>         with (vnt) {
>                 addEventListener(qx.constant.Event.KEYDOWN, function(ev) {
>                         switch(ev.getKeyCode()) {
>                                 case vKeys.esc:
>                                         vnt.close();
>                                         fld.focus();
>                                         break;
>                         }
>                 });
>                 addEventListener(qx.constant.Event.APPEAR, function() {
>                         cp.focus();
>                 });
>                 set({
>                         top:50,
>                         left:50,
>                         modal: true,
>                         minWidth: null,
>                         minHeight: null,
>                         resizeable: false
>                 });
>                 auto();
>                 add(cp);
>                 addToDocument();
>                 open();
>         }
> });
>
>
>
>
> Mike Crowe-4 wrote:
> >
> > Hi folks,
> >
> > How do you get an event when a user clicks a date (or presses space)?
> > I've reviewed David's event patch, tried it and other combinations,
> > and nothing.
> >
> > Can somebody please help?  Here's what I'm trying now:
> >
> >        var chooser = new qx.ui.component.DateChooser;
> >        chooser.auto();
> >        chooser.setWidth("100%");
> >        chooser.addEventListener(qx.constant.Event.SELECT,function() {
> >                alert( this.getDate() );
> >        });
> >         dock.add(chooser);
> >
> > I've tried both alert() and console.debug() (to firebug).
> >
> > Any help appreciated!
> > TIA
> >
> >
> >
> >
> > -------------------------------------------------------------------------
> > Take Surveys. Earn Cash. Influence the Future of IT
> > Join SourceForge.net's Techsay panel and you'll get the chance to share
> > your
> > opinions on IT & business topics through brief surveys -- and earn cash
> > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > _______________________________________________
> > qooxdoo-devel mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
> >
> >
>
> --
> View this message in context: http://www.nabble.com/Events-and-DateChooser-tf2360157.html#a6596923
> Sent from the qooxdoo-devel mailing list archive at Nabble.com.
>
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys -- and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to