datetimepicker icon indicating copy to clipboard operation
datetimepicker copied to clipboard

Buttons on date picker using display="spinner" on Samsung devices are white text on white background and not visible

Open formaldehydeson opened this issue 5 years ago • 19 comments

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

  1. Add DateTimePicker component
  2. Open component and observe buttons are not visible

Describe what you expected to happen:

  1. 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

formaldehydeson avatar Oct 27 '21 06:10 formaldehydeson

We are experiencing the same issue with display types "spinner", "clock" and "calender". A temporary workaround is to use the "default" display type.

EmilGraaf avatar Oct 27 '21 10:10 EmilGraaf

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.

formaldehydeson avatar Oct 28 '21 00:10 formaldehydeson

Experiencing the same. Switched back to default untill fixed.

lvegh avatar Oct 29 '21 10:10 lvegh

Same problem, can we restyle these buttons ?

PavelPetrovich98 avatar Nov 01 '21 08:11 PavelPetrovich98

Same here ✋

yucehasan avatar Nov 08 '21 07:11 yucehasan

One more here 🤞

artem-lygin avatar Nov 10 '21 14:11 artem-lygin

Same

Davikiao avatar Nov 11 '21 23:11 Davikiao

Same problem. After upgrade react-native package. Using default resolved the problem temporaly.

anschau avatar Nov 16 '21 15:11 anschau

Same problem for me.

PyaeSoneHtet avatar Nov 20 '21 05:11 PyaeSoneHtet

Same Problem. Not only on samsung devices. Poco phone with MIUI 12.5.3 and Android 11

hurtrelj avatar Nov 25 '21 16:11 hurtrelj

Same... is there anyone working on this? Default is pretty bad experience for picking birthdays...

Aryk avatar Nov 27 '21 08:11 Aryk

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'}} />

sirjowee avatar Dec 05 '21 10:12 sirjowee

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'}} />

VictorGobel avatar Dec 07 '21 21:12 VictorGobel

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 :)

vonovak avatar Dec 11 '21 23:12 vonovak

Example Screenshot_20220517-154624

Is there any update on this issue?

MichelBahl avatar May 17 '22 13:05 MichelBahl

Still having this issue with a POCO running miui on Expo 45 managed workflow with the spinner display

cheejiayuan512 avatar May 19 '22 06:05 cheejiayuan512

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

nospipi avatar May 24 '22 16:05 nospipi

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.

leonnleite avatar Jul 04 '22 20:07 leonnleite

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>

thanhnn147 avatar Aug 01 '22 10:08 thanhnn147