Multi lang datetime picker bugfix

This commit is contained in:
Burak Civan 2021-06-02 12:26:45 +03:00
parent 022eb988b5
commit 2bf83ec965
4 changed files with 21 additions and 3 deletions

View File

@ -13,6 +13,10 @@ body {
height: 100%; height: 100%;
} }
.datepicker[readonly] {
background-color: transparent !important;
}
/*--Layout Content--*/ /*--Layout Content--*/
.content-layout { .content-layout {
max-width: 1300px !important; max-width: 1300px !important;

View File

@ -62,9 +62,10 @@
icon="fas fa-calendar" icon="fas fa-calendar"
:date-config="{ :date-config="{
dateFormat: 'd-m', dateFormat: 'd-m',
allowInput: true, 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>
@ -149,6 +150,11 @@ export default {
pageLoad: { pageLoad: {
type: [Boolean, String] type: [Boolean, String]
},
locale: {
type: String,
default: 'en',
} }
}, },
@ -157,9 +163,17 @@ export default {
active: 0, active: 0,
logo: [], logo: [],
real_date: "", real_date: "",
lang_data: ''
}; };
}, },
created() {
if(document.documentElement.lang) {
let lang_split = document.documentElement.lang.split("-");
this.lang_data = lang_split[0];
}
},
mounted() { mounted() {
let company_data = this.company; let company_data = this.company;

View File

@ -1,4 +1,4 @@
<html> <html lang="{{ app()->getLocale() }}">
@include('partials.wizard.head') @include('partials.wizard.head')
<body class="wizard-page"> <body class="wizard-page">

View File

@ -26,7 +26,7 @@
:date-config="{ :date-config="{
wrap: true, // set wrap to true only when using 'input-group' wrap: true, // set wrap to true only when using 'input-group'
allowInput: true, allowInput: false,
@if (!empty($attributes['show-date-format'])) @if (!empty($attributes['show-date-format']))
altInput: true, altInput: true,
altFormat: '{{ $attributes['show-date-format'] }}', altFormat: '{{ $attributes['show-date-format'] }}',