datetimepicker icon indicating copy to clipboard operation
datetimepicker copied to clipboard

[Android][v9] DatePicker colorAccent no effect when display type is spinner

Open DovletAmanov opened this issue 4 years ago • 6 comments

Bug report

Summary

I am trying to change color of picker when display mode is spinner in Android (OS version: 9). Color is changing without problem when other display types are set.

Reproducible sample code

You can reproduce it in example app of this repo

Steps to reproduce

Update display prop on DateTimePicker from display to "spinner": display={display} => display={"spinner"}

Describe what you expected to happen:

Successful color change of accent color of date picker.

Environment info

"react-native": "^0.62.2",

datetimepicker version: same as in example app

Android version: 9

DovletAmanov avatar Nov 17 '20 10:11 DovletAmanov

same issue +1

degeloper34 avatar Nov 17 '20 10:11 degeloper34

hello and thanks for reporting. I don't understand why changing the display prop should change the color..? Can you please expand on this (add screenshots if needed)? Maybe you should include the color-changing bit. Thanks!

vonovak avatar Nov 18 '20 13:11 vonovak

Hello, my point was not changing color with display prop. I meant that when I set accentColor from styles.xml on date picker, main color in my case it is dividers like in the screenshot I attached is not updating for spinner mode, but if I use default mode, accentColor is applied successfully. Screen Shot 2020-11-18 at 17 51 32

DovletAmanov avatar Nov 18 '20 20:11 DovletAmanov

I had this props and picker color was default green.

mode="time"
display={Platform.select({ ios: 'spinner', android: 'clock' })}

When I changed clock to default for android - then color change to defined in styles.xml. Visually nothing changed.

bezenson avatar Nov 26 '20 07:11 bezenson

hello when set color in style.xml nothing change if display={'spinner'}. Have any solution?

thuynt99 avatar Feb 25 '21 07:02 thuynt99

@DovletAmanov How were you able to change the button's colors? I am unable to do even that

EDIT: Managed to do this

Andrea-Arguello avatar Mar 05 '21 00:03 Andrea-Arguello

Hello, I'm closing this because the issue doesn't contain code that I could comment on. Theming should improve with https://github.com/react-native-datetimepicker/datetimepicker/pull/680

if someone wants to override it, see the previous comment. Thank you 🙂

vonovak avatar Oct 25 '22 22:10 vonovak