bootstrap-year-calendar
bootstrap-year-calendar copied to clipboard
yearChanged event
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.