ovh/ovh-ui-kit

[oui-calendar] localization not working

frenautvh opened this issue · 1 comments

Description

The locale option does not work because locale files are not imported

Steps to reproduce

ouiCalendarConfigurationProvider.setLocale('fr'); // same for fr-FR fr_FR
then instantiate a oui-calendar

Expected behavior:

oui-calendar should be displayed in french locale

Actual behavior:

oui-calendar is in english, warning message in the console telling that the flatpicker locale does not exists

Frequency:
always

Additional information

the oui-calendar component should import the given flatpicker locale automatically

I've updated the documentation about it: https://ovh.github.io/ovh-ui-kit/?path=/story/design-system-components-calendar-introduction--page.
If this way doesn't work, you could still try to import the locale file according to the flatpickr documentation: https://flatpickr.js.org/localization/

It has been discussed with @cbourgois , and worked in the Manager :)