From 2216ff6a1252005ed4642a134d4917408f96174c Mon Sep 17 00:00:00 2001 From: Davy De Vuysdere Date: Wed, 10 May 2023 09:52:47 +0200 Subject: [PATCH] use 'default' locale when locale is 'en' for flatpicker --- src/js/Framework/DateTimePicker/DatePicker.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/js/Framework/DateTimePicker/DatePicker.js b/src/js/Framework/DateTimePicker/DatePicker.js index 7cad6db..dbcd5cd 100644 --- a/src/js/Framework/DateTimePicker/DatePicker.js +++ b/src/js/Framework/DateTimePicker/DatePicker.js @@ -2,7 +2,10 @@ import flatpickr from 'flatpickr' export class DatePicker { constructor (element) { - const locale = document.documentElement.lang + let locale = document.documentElement.lang + if (locale === 'en') { + locale = 'default' + } try { const i18n = require('flatpickr/dist/l10n/' + locale + '.js').default[locale]