mootools-datepicker icon indicating copy to clipboard operation
mootools-datepicker copied to clipboard

cannot show manually with dp.show()

Open cyberbeat opened this issue 14 years ago • 1 comments

dp = new DatePicker([], {
    pickerClass: 'datepicker',
    inject: 'cal',
    draggable: false
});
dp.show();

since my upgrade to version 1.2.1 this works no more. I think the event "open" is not handled anymore? why?

cyberbeat avatar Sep 24 '11 14:09 cyberbeat

I now added to the datepicker constructor:

this.addEvent('show', function(){

        // This is where we store the selected date
        if (!this.currentView || !options.openLastView) this.currentView = options.startView;

        this.date = limitDate(new Date(), options.minDate, options.maxDate);
        this.setColumns(this.originalColumns);
    }.bind(this), true);

cyberbeat avatar Mar 03 '14 19:03 cyberbeat