Skip to content

Commit ec4d1f5

Browse files
authored
Merge pull request #339 from roysc1984/keyboardAppearance-prop-not-from-theme
add keyboardAppearance prop to date picker input
2 parents 82ea605 + ae6c54c commit ec4d1f5

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/Date/DatePickerInput.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ import DatePickerModal from './DatePickerModal'
55
import { useLatest } from '../utils'
66
import type { DatePickerInputProps } from './DatePickerInput.shared'
77
import DatePickerInputWithoutModal from './DatePickerInputWithoutModal'
8-
import { StyleProp } from 'react-native'
9-
import { ViewStyle } from 'react-native'
8+
import { StyleProp, ViewStyle } from 'react-native'
109

1110
function DatePickerInput(
1211
{

src/Date/DatePickerInputWithoutModal.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,9 @@ function DatePickerInputWithoutModal(
9292
disabled={disabled}
9393
onChangeText={onDateInputChangeText}
9494
onChange={(e) => onChangeText && onChangeText(e.nativeEvent.text)}
95-
keyboardAppearance={theme.dark ? 'dark' : 'default'}
95+
keyboardAppearance={
96+
rest.keyboardAppearance ?? (theme.dark ? 'dark' : 'default')
97+
}
9698
error={(!!error && !hideValidationErrors) || !!hasError}
9799
style={[styles.input, style]}
98100
inputButton={inputButton}

0 commit comments

Comments
 (0)