This commit is contained in:
2020-02-05 22:42:47 +00:00
parent 7e60328931
commit 93246e4251
2 changed files with 20 additions and 4 deletions

View File

@@ -15,7 +15,7 @@
:error="!!error"
></v-text-field>
</template>
<v-date-picker v-model="dateOnly">
<v-date-picker :locale="defaultLocale" v-model="dateOnly">
<v-spacer></v-spacer>
<v-btn text color="primary" @click="dlgdate = false">Close</v-btn>
</v-date-picker>
@@ -51,7 +51,12 @@ export default {
}
}
},
data: () => ({ date: null, oldDate: null, dlgdate: false }),
data: () => ({
date: null,
oldDate: null,
dlgdate: false,
defaultLocale: window.$gz.locale.getFirstBrowserLanguage().split("-", 1)[0]
}),
props: {
label: String,
rules: Array,

View File

@@ -24,7 +24,7 @@
ref="theDatePicker"
v-model="dateOnly"
@input="dlgdate = false"
locale="DE"
:locale="defaultLocale"
>
<v-spacer></v-spacer>
<v-btn text color="primary" @click="dlgdate = false">Close</v-btn>
@@ -71,6 +71,7 @@
<p v-show="error" class="form__error v-messages theme--light error--text">
{{ error }}
</p>
{{ defaultLocale }}
</div>
</template>
<script>
@@ -89,8 +90,18 @@ export default {
throw "DateTimeControl: $gz.locale is required and missing";
}
}
// this.defaultLocale = window.$gz.locale
// .getFirstBrowserLanguage()
// .split("-", 1);
},
data: () => ({ date: null, oldDate: null, dlgdate: false, dlgtime: false }),
data: () => ({
date: null,
oldDate: null,
dlgdate: false,
dlgtime: false,
defaultLocale: window.$gz.locale.getFirstBrowserLanguage().split("-", 1)[0]
}),
props: {
label: String,
rules: Array,