mirror of
https://github.com/frappe/air-datepicker.git
synced 2026-01-14 11:01:22 +08:00
improve update method, now it can refresh language option
This commit is contained in:
parent
629e1f8318
commit
a23309d46c
1
dist/js/datepicker.js
vendored
1
dist/js/datepicker.js
vendored
@ -376,6 +376,7 @@ var Datepicker;
|
|||||||
|
|
||||||
this._createShortCuts();
|
this._createShortCuts();
|
||||||
this._syncWithMinMaxDates();
|
this._syncWithMinMaxDates();
|
||||||
|
this._defineLocale(this.opts.language);
|
||||||
this.nav._addButtonsIfNeed();
|
this.nav._addButtonsIfNeed();
|
||||||
this.nav._render();
|
this.nav._render();
|
||||||
this.views[this.currentView]._render();
|
this.views[this.currentView]._render();
|
||||||
|
|||||||
@ -37,6 +37,12 @@
|
|||||||
.update('maxDate', date)
|
.update('maxDate', date)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
$('button').on('click', function () {
|
||||||
|
$start.data('datepicker').update({
|
||||||
|
language: 'en'
|
||||||
|
})
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@ -376,6 +376,7 @@ var Datepicker;
|
|||||||
|
|
||||||
this._createShortCuts();
|
this._createShortCuts();
|
||||||
this._syncWithMinMaxDates();
|
this._syncWithMinMaxDates();
|
||||||
|
this._defineLocale(this.opts.language);
|
||||||
this.nav._addButtonsIfNeed();
|
this.nav._addButtonsIfNeed();
|
||||||
this.nav._render();
|
this.nav._render();
|
||||||
this.views[this.currentView]._render();
|
this.views[this.currentView]._render();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user