Bugfix solved
This commit is contained in:
parent
f95ee61bf2
commit
015845f76b
@ -64,8 +64,7 @@
|
|||||||
dateFormat: 'd-m',
|
dateFormat: 'd-m',
|
||||||
allowInput: false,
|
allowInput: false,
|
||||||
altInput: true,
|
altInput: true,
|
||||||
altFormat: 'j F',
|
altFormat: 'j F'
|
||||||
locale:require(`flatpickr/dist/l10n/${lang_data}.js`).default[lang_data]
|
|
||||||
}"
|
}"
|
||||||
v-model="real_date"
|
v-model="real_date"
|
||||||
></akaunting-date>
|
></akaunting-date>
|
||||||
@ -154,8 +153,17 @@ export default {
|
|||||||
|
|
||||||
locale: {
|
locale: {
|
||||||
type: String,
|
type: String,
|
||||||
default: 'en',
|
},
|
||||||
}
|
|
||||||
|
dateConfig: {
|
||||||
|
type: Object,
|
||||||
|
default: function () {
|
||||||
|
return {
|
||||||
|
|
||||||
|
};
|
||||||
|
},
|
||||||
|
description: "FlatPckr date configuration"
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
@ -170,7 +178,12 @@ export default {
|
|||||||
created() {
|
created() {
|
||||||
if(document.documentElement.lang) {
|
if(document.documentElement.lang) {
|
||||||
let lang_split = document.documentElement.lang.split("-");
|
let lang_split = document.documentElement.lang.split("-");
|
||||||
this.lang_data = lang_split[0];
|
|
||||||
|
if (lang_split[0] !== 'en') {
|
||||||
|
|
||||||
|
const lang = require(`flatpickr/dist/l10n/${lang_split[0]}.js`).default[lang_split[0]];
|
||||||
|
this.dateConfig.locale = lang;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user