Merge pull request #2338 from ali00h/master
fix console error in not found locale
This commit is contained in:
commit
65252a16f0
@ -133,10 +133,13 @@ export default {
|
|||||||
|
|
||||||
created() {
|
created() {
|
||||||
if (this.locale !== 'en') {
|
if (this.locale !== 'en') {
|
||||||
|
try {
|
||||||
const lang = require(`flatpickr/dist/l10n/${this.locale}.js`).default[this.locale];
|
const lang = require(`flatpickr/dist/l10n/${this.locale}.js`).default[this.locale];
|
||||||
|
|
||||||
this.dateConfig.locale = lang;
|
this.dateConfig.locale = lang;
|
||||||
}
|
}
|
||||||
|
catch (e) {
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user