Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Datepicker: Month in german #340

Closed
michaelbenker opened this issue Mar 23, 2017 · 3 comments
Closed

Datepicker: Month in german #340

michaelbenker opened this issue Mar 23, 2017 · 3 comments

Comments

@michaelbenker
Copy link

Version

Tell us which versions you are using:

  • tcomb-form-native v0.6.7
  • react-native v0.41.2

Hello,

how can I get the Month from the Datepicker in german?
Thanx

@javiercr
Copy link
Collaborator

javiercr commented Mar 23, 2017

The datepicker that comes with the bootstrap templates (datepicker.android.js and datepicker.ios.js) uses the native components provided by React Native: DatePickerIOS and DatePickerAndroid.

DatePickerIOS is a wrapper around iOS' UIDatePicker. Despite the fact that UIDatePicker has locale attribute, this is not exposed in the current implementation of RN's DatePickerIOS (mode is the only attribute exposed).

DatePickerAndroid is a wrapper around Android's DatePickerDialog. There are some workarounds to change the language for the native component as explained here but they are not exposed by the RN's component.

So in other words, with the current implementation of the datepickers provided by RN (that tcomb-form-native relies on) there is no way to change the language, you're stuck with the system language 😕

You can look for other datepicker components with localization support and create a tcomb-form-native factory to use them in your forms.

@javiercr
Copy link
Collaborator

javiercr commented Mar 23, 2017

I have opened a new feature request for React Native:
https://react-native.canny.io/feature-requests/p/localization-support-for-datepicker

Maybe you wanna upvote it :)

@alterx
Copy link

alterx commented Jan 24, 2019

@javiercr @michaelbenker , DatePickerIOS currently supports the locale prop as seen here.

I've created a small PR to add support for it (#556)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants