Skip to content

Commit

Permalink
Merge pull request #114 from davysumo/flatpicker-en-default
Browse files Browse the repository at this point in the history
use 'default' locale when locale is 'en' for flatpicker
  • Loading branch information
tijsverkoyen authored May 10, 2023
2 parents 4adf7d6 + 2216ff6 commit 7c7d042
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/js/Framework/DateTimePicker/DatePicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 7c7d042

Please sign in to comment.