datetimepicker icon indicating copy to clipboard operation
datetimepicker copied to clipboard

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

Open sayo96 opened this issue 2 years ago • 4 comments

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

sayo96 avatar Sep 23 '22 10:09 sayo96

I add textColor="black" solve this.

lightnate avatar Sep 27 '22 02:09 lightnate

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

Elizabeth2002 avatar Oct 04 '22 12:10 Elizabeth2002

same issue here, the above solutions don't help.

Ahmad-Elsayed avatar Oct 07 '22 09:10 Ahmad-Elsayed

I am experiencing the same issue. None of the proposed solutions worked.

Livijn avatar Oct 07 '22 12:10 Livijn

Does adding the themeVariant="light" prop to <DateTimePicker/> help?

SavannahHowell avatar Oct 18 '22 15:10 SavannahHowell

Hello and thanks for reporting, I cannot reproduce it, please take a look at the example repo where I have taken the following screenshots.

screenhots

Simulator Screen Shot - iPhone 14 Pro - 2022-10-26 at 00 30 42 Simulator Screen Shot - iPhone 14 Pro - 2022-10-26 at 00 30 51

Please open a new issue and make sure to provide a runnable repro.

Thank you 🙂

vonovak avatar Oct 25 '22 22:10 vonovak