Fix date picker not properly localized (#330)

* Fix language in date picker

Vuetify allows custom-named locales,
but the date-picker really only works with BCP 47 language tag

* Save lang at proper time + Update Vuetify lang on the fly
This commit is contained in:
sephrat
2021-04-21 18:36:49 +02:00
committed by GitHub
parent 8e27d0b83f
commit 29b9c231d3
4 changed files with 31 additions and 24 deletions

View File

@@ -211,7 +211,6 @@ export default {
methods: {
writeLang(val) {
this.$store.commit("setLang", val);
this.settings.language = val;
},
deleteCategoryfromDatabase(category) {
@@ -225,7 +224,9 @@ export default {
},
async saveSettings() {
await api.siteSettings.update(this.settings);
this.$store.commit("setLang", this.settings.language);
this.$store.dispatch("setLang", {
currentVueComponent: this,
language: this.settings.language });
this.getOptions();
},
},