farhoudshapouran / react-native-ui-datepicker

Customizable React Native 📅 DatePicker component for Android, iOS, and Web. It includes single, range and multiple modes and supports different locales.
https://farhoudshapouran.github.io/react-native-ui-datepicker/
MIT License
275 stars 28 forks source link

Couldn't localize for Turkish #48

Closed askmakdag closed 6 months ago

askmakdag commented 6 months ago

I want to use the month names in Turkish. Giving locale={'tr'}didn't work.

askmakdag commented 6 months ago

locale={require('dayjs/locale/tr')} fixed my issue. Thanks.

farhoudshapouran commented 6 months ago

It is better to import your desired locales in App.tsx (App.jsx):

import 'dayjs/locale/tr' import 'dayjs/locale/fr' import 'dayjs/locale/de'

and use your locale locale={'tr'} in DateTimePicker every where you want