datetimepicker
datetimepicker copied to clipboard
Current date appears as blank if dark mode is turned on IOS
Bug report
Summary
Current value of the date picker appears as blank when dark mode is turned on in IOS.
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:
- … 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
I add textColor="black"
solve this.
Set the minimumDate prop of the DateTimePicker to a particular value instead of leaving it undefined.
same issue here, the above solutions don't help.
I am experiencing the same issue. None of the proposed solutions worked.
Does adding the themeVariant="light"
prop to <DateTimePicker/>
help?
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
Please open a new issue and make sure to provide a runnable repro.
Thank you 🙂