jquery.mtz.monthpicker
jquery.mtz.monthpicker copied to clipboard
Can't check selected year on 'monthpicker-show' event
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());
},