Buttons on date picker using display="spinner" on Samsung devices are white text on white background and not visible
Bug report
Summary
When using display="spinner" on Samsung devices the the Cancel and OK buttons are both white and invisible on the white background of the picker.
Reproducible sample code
https://snack.expo.dev/@formaldeyhdeson/moody-juice-box
Steps to reproduce
- Add DateTimePicker component
- Open component and observe buttons are not visible
Describe what you expected to happen:
- Buttons should be visible
Environment info
Expo version 40.0 but in my snack I used 42.0 and the issue is still present. Snack also has the latest version of this component
npx react-native info output:
info Fetching system and libraries information...
System:
OS: Windows 10 10.0.19042
CPU: (8) x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
Memory: 5.34 GB / 15.86 GB
Binaries:
Node: 12.18.2 - C:\Program Files\nodejs\node.EXE
Yarn: Not Found
npm: 7.13.0 - C:\Program Files\nodejs\npm.CMD
Watchman: Not Found
SDKs:
Android SDK: Not Found
Windows SDK:
AllowAllTrustedApps: Disabled
Versions: 10.0.17763.0
IDEs:
Android Studio: Version 3.1.0.0 AI-173.4720617
Visual Studio: Not Found
Languages:
Java: 13.0.2 - C:\Program Files\Java\jdk-13.0.2\bin\javac.EXE
Python: 3.9.6 - C:\Users\alihe\AppData\Local\Programs\Python\Python39\python.EXE
npmPackages:
@react-native-community/cli: Not Found
react: 16.13.1 => 16.13.1
react-native: https://github.com/expo/react-native/archive/sdk-40.0.0.tar.gz => 0.63.2
react-native-windows: Not Found
npmGlobalPackages:
*react-native*: Not Found
datetimepicker version: 3.5.2
iOS / Android version: Observed on Samsung S10+ and S10E on Android 11 One UI 3.1
We are experiencing the same issue with display types "spinner", "clock" and "calender". A temporary workaround is to use the "default" display type.
Just checked with "clock" and "calendar" type and you're right I'm the same issue with those as well. Removed the display property all-together for now to workaround.
Experiencing the same. Switched back to default untill fixed.
Same problem, can we restyle these buttons ?
Same here ✋
One more here 🤞
Same
Same problem. After upgrade react-native package. Using default resolved the problem temporaly.
Same problem for me.
Same Problem. Not only on samsung devices. Poco phone with MIUI 12.5.3 and Android 11
Same... is there anyone working on this? Default is pretty bad experience for picking birthdays...
you can pass a textColor="#000" as props. this fixes the issue.
<DateTimePicker
display={dateDisplay}
value={new Date(date)}
mode="date"
onChange={onChange}
textColor='red'
style={{ color: 'red'}}
/>
Also having the issue, on android OnePlus with the display="spinner" The textColor is only working for IOS (same for the style={{ color: 'red'}} )
you can pass a textColor="#0" as props. this fixes the issue.
<DateTimePicker display={dateDisplay} value={new Date(date)} mode="date" onChange={onChange} textColor='red' style={{ color: 'red'}} />
hello, this is a bug present only with expo sdk; the code works just fine in the example project. Try upgrading to latest expo 44 beta.
thank you :)
Still having this issue with a POCO running miui on Expo 45 managed workflow with the spinner display
Issue still unresolved for expo go testing apps,however after building the app to be published in the stores,its working fine,for me at least
Issue still unresolved for expo go testing apps,however after building the app to be published in the stores,its working fine,for me at least
I will print this quote just to show it to my QA team. lol
// updated (1 hour later) Not worked here. When I use the APK file to test local, it is the same as expo go.
I tried so many solution. It work for display mode "date", "time" but not working for "spinner" Finally, i found this solution:
Add item <item name="android:textColor">#3D3D3D</item> inside AppTheme
Note: this item will change text color of all default text in your app
<style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
<item name="android:textColor">#3D3D3D</item>
</style>
