diff --git a/js/src/calendar.js b/js/src/calendar.js index 7849dd5ca..1083c4795 100644 --- a/js/src/calendar.js +++ b/js/src/calendar.js @@ -201,15 +201,13 @@ class Calendar extends BaseComponent { EventHandler.on(this._element, 'click', '.btn-month', event => { event.preventDefault() this._view = 'months' - this._element.innerHTML = '' - this._createCalendarPanel() + this._updateCalendar() }) EventHandler.on(this._element, 'click', '.btn-year', event => { event.preventDefault() this._view = 'years' - this._element.innerHTML = '' - this._createCalendarPanel() + this._updateCalendar() }) } @@ -403,7 +401,7 @@ class Calendar extends BaseComponent { _updateCalendar() { this._element.innerHTML = '' - this._createCalendarPanel() + this._createCalendar() } _dayClassNames(date, month) {