year Changed event is not propagated outside like clickDay even though it is made available.
to fix it replace setYears event trigger with var eventResult = this._triggerEvent('yearChanged', { element:$(this), currentYear: this.options.startYear, preventRendering: false });
the fix is using element:$(this) $(this) refers to the button we've clicked to run the function.
year Changed event is not propagated outside like clickDay even though it is made available. to fix it replace setYears event trigger with
var eventResult = this._triggerEvent('yearChanged', { element:$(this), currentYear: this.options.startYear, preventRendering: false });
the fix is usingelement:$(this)
$(this) refers to the button we've clicked to run the function.