improve update method, now it can refresh language option

This commit is contained in:
t1m0n 2015-11-17 11:59:28 +03:00
parent 629e1f8318
commit a23309d46c
3 changed files with 8 additions and 0 deletions

View File

@ -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();

View File

@ -37,6 +37,12 @@
.update('maxDate', date)
}
})
$('button').on('click', function () {
$start.data('datepicker').update({
language: 'en'
})
});
</script>
</body>
</html>

View File

@ -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();