Any way to change the DatePicker (non-native) locale?

My DatePickers are in English locale, e.g. saying "July" instea of "Јули" based on my env locale. Any way to change this? What library is used on the FE for the DatePicker?
9 Replies
Никола Стојков
I tried about everything I can find on the net, no luck Bump
ChesterS
ChesterS3mo ago
I tried this
DateTimePicker::make('date')
->native(false)
->locale('it')
DateTimePicker::make('date')
->native(false)
->locale('it')
and it works. Which locale are you trying? Are you sure it's supported?
Никола Стојков
Tried it, doesn't work. I'm trying with mk locale, and it looks like locale file is present for mk in the Flatpickr github repo I assume we're using Flatpickr under the hood, I've read it somewhere I guess we're using the same locales they have supported? Since it works if I try it
ChesterS
ChesterS3mo ago
Don't think mk is supported check vendor/filament/forms/resources/js/components/date-time-picker.js
Никола Стојков
GitHub
flatpickr/src/l10n at master · flatpickr/flatpickr
lightweight, powerful javascript datetimepicker with no dependencies - flatpickr/flatpickr
Никола Стојков
ah, mk is missing in our datepicker allthought DayJS added it 6 years ago, hmm
Никола Стојков
GitHub
dayjs/src/locale at dev · iamkun/dayjs
⏰ Day.js 2kB immutable date-time library alternative to Moment.js with the same modern API - iamkun/dayjs
ChesterS
ChesterS3mo ago
might be as easy as adding a pr with this mk: require('dayjs/locale/mk'), ?
toeknee
toeknee3mo ago
GitHub
Add Greek (el) locale to date picker component by balismatz · Pull...
Description The date picker component does not include the Greek (el) locale. This pull request adds it. Visual changes Before: After: Functional changes Code style has been fixed by running th...

Did you find this page helpful?