diff --git a/js/src/plugins/dateFns.ts b/js/src/plugins/dateFns.ts index 545428f0..0a88a9e3 100644 --- a/js/src/plugins/dateFns.ts +++ b/js/src/plugins/dateFns.ts @@ -5,10 +5,9 @@ export const dateFnsPlugin = { install(app: App, options: { locale: string }) { function dateFnsfileForLanguage(lang: string) { const matches: Record = { - en_US: "en-US", en: "en-US", }; - return matches[lang] ?? lang; + return matches[lang] ?? lang.replace("_", "-"); } import( diff --git a/js/src/views/Event/EditView.vue b/js/src/views/Event/EditView.vue index ddb78ce9..d917583f 100644 --- a/js/src/views/Event/EditView.vue +++ b/js/src/views/Event/EditView.vue @@ -70,7 +70,7 @@ class="datepicker starts-on" :placeholder="t('Type or select a date…')" icon="calendar-today" - :locale="$i18n.locale" + :locale="$i18n.locale.replace('_', '-')" v-model="beginsOn" horizontal-time-picker editable @@ -90,7 +90,7 @@ class="datepicker ends-on" :placeholder="t('Type or select a date…')" icon="calendar-today" - :locale="$i18n.locale" + :locale="$i18n.locale.replace('_', '-')" v-model="endsOn" horizontal-time-picker :min-datetime="beginsOn"