datetimepicker
datetimepicker copied to clipboard
[Android][v9] DatePicker colorAccent no effect when display type is spinner
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
same issue +1
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!
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.
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.
hello when set color in style.xml nothing change if display={'spinner'}. Have any solution?
@DovletAmanov How were you able to change the button's colors? I am unable to do even that
EDIT: Managed to do this
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 🙂