henninghall / react-native-date-picker

React Native Date Picker is datetime picker for Android and iOS. It includes date, time and datetime picker modes. The datepicker is customizable and is supporting different languages. It's written with native code to achieve the best possible look, feel and performance.
MIT License
2.21k stars 338 forks source link

The Picker text is not visible in Android's Dark mode #857

Closed Alexkin26 closed 3 weeks ago

Alexkin26 commented 3 weeks ago

Describe the bug The Picker is not visible when the Android's theme is set to dark mode.

Expected behavior Picker's background color must be white and Picker's text color must be black

To Reproduce Add example code that reproduces the behavior.

<DatePicker
  date={fecha}
  onDateChange={() => setFecha}
  locale="es"
/>

Smartphone (please complete the following information):

screencap-2024-09-09T065211 319Z

henninghall commented 3 weeks ago

As expected. Use the theme prop.

Alexkin26 commented 3 weeks ago

theme prop is available when modal prop is set ONLY!

AsifNoushad03 commented 1 week ago

If the text in your DatePicker is not visible in Android's dark mode, you can force it to use the light theme by setting theme='light'

rvera commented 5 days ago

I also ran into this issue and can confirm this can be fixed by setting the property theme="light". This contradicts the README, so the documentation is incorrect and out of date.

henninghall commented 3 days ago

Thats right, the readme was incorrect, theme prop is supported both inline and in modals nowadays. The readme is now updated.