diff --git a/dist/js/datepicker.js b/dist/js/datepicker.js index f92b2b8..97b36a8 100644 --- a/dist/js/datepicker.js +++ b/dist/js/datepicker.js @@ -376,6 +376,7 @@ var Datepicker; this._createShortCuts(); this._syncWithMinMaxDates(); + this._defineLocale(this.opts.language); this.nav._addButtonsIfNeed(); this.nav._render(); this.views[this.currentView]._render(); diff --git a/index.html b/index.html index 20d642a..620acbf 100644 --- a/index.html +++ b/index.html @@ -37,6 +37,12 @@ .update('maxDate', date) } }) + + $('button').on('click', function () { + $start.data('datepicker').update({ + language: 'en' + }) + }); \ No newline at end of file diff --git a/js/datepicker/datepicker.js b/js/datepicker/datepicker.js index 8f5e8f8..135ff55 100644 --- a/js/datepicker/datepicker.js +++ b/js/datepicker/datepicker.js @@ -376,6 +376,7 @@ var Datepicker; this._createShortCuts(); this._syncWithMinMaxDates(); + this._defineLocale(this.opts.language); this.nav._addButtonsIfNeed(); this.nav._render(); this.views[this.currentView]._render();