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.

Current date appears as blank if dark mode is turned on IOS

See original GitHub issue

Bug report

Summary

Current value of the date picker appears as blank when dark mode is turned on in IOS. Screenshot 2022-09-23 at 11 45 26 am

Reproducible sample code

Here is a basic sample of my code. I’m unable to understand why the date appears blank even though i pass the textColor prop
<DateTimePicker testID={${id}-date-time-picker-date} value={date} mode=“date” display=“spinner” onChange={handleChange} textColor={Black} />

I just used one of your basic examples listed on the repo

Steps to reproduce

Describe what you expected to happen:

  1. … I was hoping the text to show up irrespective of whether the user is in dark or light mode.

Environment info

Expo version: 45.0.0

npx react-native info output:

# System:
    OS: macOS 12.6
    CPU: (8) arm64 Apple M1 Pro
    Memory: 342.78 MB / 16.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 14.19.1 - /opt/homebrew/opt/node@14/bin/node
    Yarn: 1.22.18 - /opt/homebrew/bin/yarn
    npm: 6.14.16 - /opt/homebrew/opt/node@14/bin/npm
    Watchman: 2022.03.21.00 - /opt/homebrew/bin/watchman
  Managers:
    CocoaPods: Not Found
  SDKs:
    iOS SDK:
      Platforms: DriverKit 21.4, iOS 16.0, macOS 12.3, tvOS 16.0, watchOS 9.0
    Android SDK: Not Found
  IDEs:
    Android Studio: Not Found
    Xcode: 14.0/14A309 - /usr/bin/xcodebuild
  Languages:
    Java: Not Found
  npmPackages:
    @react-native-community/cli: Not Found
    react: 17.0.2 => 17.0.2 
    react-native: 0.68.2 => 0.68.2 
    react-native-macos: Not Found
  npmGlobalPackages:

datetimepicker version: 6.1.2

iOS / Android version: IOS 16

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:3
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
Elizabeth2002commented, Oct 4, 2022

Set the minimumDate prop of the DateTimePicker to a particular value instead of leaving it undefined.

2reactions
lightnatecommented, Sep 27, 2022

I add textColor="black" solve this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

UIDatePicker Month/Year Blank On Load - Stack Overflow
the reason is that your device is in dark mode. in night mode, default label color is white. so if UI background is...
Read more >
Use Dark Mode on your iPhone and iPad - Apple Support
Go to Settings, then tap Display & Brightness. Select Dark to turn on Dark Mode. To turn Dark Mode on and off in...
Read more >
iPhone Messages App Blank? Here's Why & The Real Fix!
The first thing to do when the iPhone Messages app is blank is close and reopen the Messages app. It's possible the app...
Read more >
iPhone 14 Pro: Enable black-and-white always-on display mode
The trick to getting a black-and-white always-on display right now is to use a long-standing Focus mode setting called “Dim Lock Screen.” This ......
Read more >
These Are the Most Annoying Things About Your iPhone (and ...
But, like many new features on iOS 16, you can turn this setting off. Simply launch the Settings app, go to Home Screen...
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