Skip to content

Commit

Permalink
Bugfix solved
Browse files Browse the repository at this point in the history
  • Loading branch information
brkcvn committed Jun 2, 2021
1 parent f95ee61 commit 015845f
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions resources/assets/js/views/wizard/Company.vue
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@
dateFormat: 'd-m',
allowInput: false,
altInput: true,
altFormat: 'j F',
locale:require(`flatpickr/dist/l10n/${lang_data}.js`).default[lang_data]
altFormat: 'j F'
}"
v-model="real_date"
></akaunting-date>
Expand Down Expand Up @@ -154,8 +153,17 @@ export default {
locale: {
type: String,
default: 'en',
}
},
dateConfig: {
type: Object,
default: function () {
return {
};
},
description: "FlatPckr date configuration"
},
},
data() {
Expand All @@ -170,7 +178,12 @@ export default {
created() {
if(document.documentElement.lang) {
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;
}
}
},
Expand Down

0 comments on commit 015845f

Please sign in to comment.