lucianocosta / jquery.mtz.monthpicker

Monthpicker, the missing JQuery widget.
http://lucianocosta.com.br/jquery.mtz.monthpicker
96 stars 57 forks source link

Can't check selected year on 'monthpicker-show' event #50

Open adammolnar opened 11 years ago

adammolnar commented 11 years ago

Thanks for your really missing jQuery plugin!

For disabling months, in your examples, you use the 'monthpicker-change-year' event with a year parameter which is received from the select item. This way of disabling months if the initially shown year has any disabled months doesn't work since the 'monthpicker-change-year' event is not fired. I recommend to add a year parameter to the 'monthpicker-show' event like this:

    show: function () {
        ...
        widget.show();
        var yearSelect = widget.find('select');
        yearSelect.focus();
        this.trigger('monthpicker-show', yearSelect.val());
    },