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

iOS 14 time picker presents both 24 hours and AM PM #325

Closed
memelie opened this issue Nov 2, 2020 · 1 comment
Closed

iOS 14 time picker presents both 24 hours and AM PM #325

memelie opened this issue Nov 2, 2020 · 1 comment
Labels
good first issue Good for newcomers

Comments

@memelie
Copy link

memelie commented Nov 2, 2020

Summary

The iOS 14 time picker presents both the 24 hours wheel and the AM/PM selector, when using locale="en-US" while the phone locale is "en-GB".

Image d’iOS (3)

Code sample

<DateTimePicker  
   style={style}  
   value={date}  
   mode="time"  
   // trick to get the AM / PM button, even if the locale is "en-GB"  
   locale="en-US"  
   display="inline"  
   onChange={(event, date) => action(date?.toTimeString())}  
 />

Specs

Packages

  • "react": "16.13.1",
  • "react-native": "0.63.3",
  • "@react-native-community/datetimepicker": "^3.0.4",

Device

  • iPhone 6
  • iOS 14.1
  • English UK

Question

Does someone has encountered the same issue?
How can I get the time picker to be in 12 hours format with the AM/PM option?

Thank you so much for your help

@vonovak vonovak added the good first issue Good for newcomers label Jan 25, 2021
@vonovak
Copy link
Member

vonovak commented Dec 11, 2021

should be fixed by #540

@vonovak vonovak closed this as completed Dec 11, 2021
@react-native-datetimepicker react-native-datetimepicker locked and limited conversation to collaborators Dec 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants