question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

is24Hour not working on iOS 13

See original GitHub issue

Bug report

Summary

I set the is24Hour to true, but it still give me 12 hours picker

Environment info

react-native info output:

System: OS: macOS 10.15.3 CPU: (4) x64 Intel® Core™ i5-4278U CPU @ 2.60GHz Memory: 435.51 MB / 8.00 GB Shell: 5.7.1 - /bin/zsh Binaries: Node: 14.2.0 - ~/.nvm/versions/node/v14.2.0/bin/node Yarn: Not Found npm: 6.14.5 - ~/.nvm/versions/node/v14.2.0/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman Managers: CocoaPods: 1.9.3 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: iOS 13.4, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2 Android SDK: Not Found IDEs: Android Studio: 3.6 AI-192.7142.36.36.6392135 Xcode: 11.4/11E146 - /usr/bin/xcodebuild Languages: Java: 1.8.0_241 - /usr/bin/javac Python: 2.7.16 - /usr/bin/python npmPackages: @react-native-community/cli: Not Found react: 16.13.1 => 16.13.1 react-native: 0.63.0 => 0.63.0 npmGlobalPackages: react-native: Not Found

Library version: 2.6.0

Steps to reproduce

try this code

<DateTimePicker
      testID = "dateTimePicker"
      value = {new Date()}
      mode = 'datetime'
      is24Hour = {true}
 />

on my machine still showing 12 hours option of picker and am/pm options

Screen Shot 2020-07-13 at 16 04 55
  1. Install properly the library
  2. try the code

Describe what you expected to happen:

  1. when using is24Hour props to true, the picker should showing 24 hours options of picker

Reproducible sample code

<DateTimePicker
      testID = "dateTimePicker"
      value = {new Date()}
      mode = 'datetime'
      is24Hour = {true}
 />

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6

github_iconTop GitHub Comments

3reactions
erikvlarssoncommented, Feb 26, 2022

Yo. Faced the same issue but setting the locale property solved it, I.e:

          <TimePicker
            is24Hour={true}
            mode="time"
            locale="en-FR"
            minuteInterval={15}
            testID="dateTimePicker"
            value={timeOfMeal}
            display="inline"
            onChange={changeTime}
          />
0reactions
kashif111777commented, Jul 15, 2022

Yup Locale=“en-UK” also works for me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

React Native DateTimePicker not Opening in IOS
Datetime Picker is not opening i'm using react-native with react-hooks, in Android works fine . but its not opening in IOS and not...
Read more >
react-native-community/datetimepicker - npm
React Native date & time picker component for iOS, Android and Windows ... Other configurations are very likely to work as well but...
Read more >
iOS 13/13.1 safari issues - iPhone - Apple Support Communities
Since upgrading to iOS 13/13.1, I have been having issues with safari loading web pages. It goes not seem to affect all pages, ......
Read more >
iOS 13: Top 20 Problems & How to Fix
The “unable to check for update” error occurs when iPhone and iPad users are trying to update their iOS version. common problems on...
Read more >
autozone salary per hour
Autozone Salary Per HourPSM Job Opening in Lake Havasu City, AZ at Autozone. AutoZone Uses Managers As Cheap Labor, 9th Circ. Average AutoZone...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found