@@ -94,6 +94,14 @@ export type DateTimePickerProps = OldApiProps &
94
94
* Allows changing the visual display of the picker
95
95
*/
96
96
display ?: string ;
97
+ /**
98
+ * Text color of the wheel picker items
99
+ */
100
+ textColor ?: string ;
101
+ /**
102
+ * Background color of the wheel picker
103
+ */
104
+ backgroundColor ?: string ;
97
105
/**
98
106
* Confirm button props
99
107
*/
@@ -137,6 +145,8 @@ const DateTimePicker = forwardRef((props: DateTimePickerPropsInternal, ref: Forw
137
145
onChange,
138
146
dialogProps,
139
147
migrateDialog,
148
+ textColor = Colors . $textDefault ,
149
+ backgroundColor = Colors . $backgroundDefault ,
140
150
headerStyle,
141
151
testID,
142
152
display = Constants . isIOS ? 'spinner' : undefined ,
@@ -186,6 +196,10 @@ const DateTimePicker = forwardRef((props: DateTimePickerPropsInternal, ref: Forw
186
196
} ;
187
197
} , [ dialogProps , testID ] ) ;
188
198
199
+ const dateTimePickerStyle = useMemo ( ( ) => {
200
+ return { backgroundColor} ;
201
+ } , [ backgroundColor ] ) ;
202
+
189
203
const { getStringValue : getStringValueOld } = useOldApi ( { dateFormat, dateFormatter, timeFormat, timeFormatter} ) ;
190
204
191
205
const getStringValue = ( ) => {
@@ -240,6 +254,7 @@ const DateTimePicker = forwardRef((props: DateTimePickerPropsInternal, ref: Forw
240
254
row
241
255
spread
242
256
bg-$backgroundDefault
257
+ backgroundColor = { backgroundColor }
243
258
paddingH-20
244
259
style = { [ styles . header , headerStyle ] }
245
260
testID = { `${ testID } .header` }
@@ -280,6 +295,8 @@ const DateTimePicker = forwardRef((props: DateTimePickerPropsInternal, ref: Forw
280
295
minuteInterval = { minuteInterval }
281
296
timeZoneOffsetInMinutes = { timeZoneOffsetInMinutes }
282
297
display = { display }
298
+ textColor = { textColor }
299
+ style = { dateTimePickerStyle }
283
300
themeVariant = { themeVariant }
284
301
testID = { `${ testID } .picker` }
285
302
/>
0 commit comments