It should close automatically, maybe have a look at the examples:
http://aryweb.nl/projects/mootools-datepicker/Test/


On Wed, May 4, 2011 at 6:39 PM, hairbo <[email protected]> wrote:

> Hi all,
>
> I've used an earlier version of this:
>
> http://mootools.net/forge/p/mootools_datepicker
>
> ...for several years and it's worked nicely.  Now that I'm upgrading to
> Mootools 1.3, I need to upgrade to the version of the picker that's in the
> Forge.  I've got everything working, except for one annoying detail.  In the
> earlier version of this picker, the calendar closed when you selected a
> date.  In this version, the calendar doesn't close until you click outside
> the calendar.  I suppose I'm fine with that as the default behavior, except
> there doesn't appear to be an option to close the picker on date select.  I
> thought I could use the "onSelect" method, but that doesn't appear to do the
> trick, either.  I'm not sure I can set up a jsfiddle for this, but the code
> I'm using to call the picker is just this:
>
> var datepick = new Picker.Date( $$('.date_toggled'), {
>     timePicker: false,
>     positionOffset: {x: 0, y: 4},
>     pickerClass: 'datepicker',
>     useFadeInOut: !Browser.ie,
>     onSelect: function(date) {
>       console.log(this);
>                         this.close();
>     }
>  });
>
> The output of console.log appears to be the picker itself, so I figured I'd
> just be able to do "this.close()" or "this.hide()", but neither appears to
> work.
>
> Help?
>
>

Reply via email to