farhoudshapouran/react-native-ui-datepicker

Can't change the locale

Closed this issue · 2 comments

I tried to change the locale in 'fr' and 'es' but nothing change. I also tried different format like 'FR', 'fr_FR' but nothing works.
I went to check the demo here : https://farhoudshapouran.github.io/react-native-ui-datepicker/ and event here when we click on locale buttons it doesn't change the language.

Have someone the same mistake ?

<DateTimePicker
                    mode="single"
                    locale="fr"
                    firstDayOfWeek={1}
                    date={birthDate}
                    onChange={(response) => {
                      setBirthDate(new Date(response.date.toString()))
                      toggleDatePicker()
                    }}
                    selectedItemColor={colors.mainColors.mainColor}
/>

add this on top,
require('dayjs/locale/fr');

thank you ! 😃