Fix title/buttons in date picker not being visible on Android in dark mode (#6880)

This commit is contained in:
Ryan McLeod
2024-12-02 21:25:10 -05:00
committed by GitHub
parent 84f4afd3d7
commit 147efb628a
3 changed files with 8 additions and 5 deletions
@@ -50,11 +50,14 @@ export function DateField({
/>
{open && (
// Android implementation of DatePicker currently does not change default button colors according to theme and only takes hex values for buttonColor
// Can remove the buttonColor setting if/when this PR is merged: https://github.com/henninghall/react-native-date-picker/pull/871
<DatePicker
modal
open
timeZoneOffsetInMinutes={0}
theme={t.name === 'light' ? 'light' : 'dark'}
buttonColor={t.name === 'light' ? '#000000' : '#ffffff'}
date={new Date(value)}
onConfirm={onChangeInternal}
onCancel={onCancel}