@@ -22,6 +22,11 @@ function DatePickerInputWithoutModal(
2222 modal,
2323 inputButtons,
2424 saveLabel,
25+ saveLabelDisabled,
26+ uppercase,
27+ startYear,
28+ endYear,
29+ onChangeText,
2530 ...rest
2631 } : DatePickerInputProps & {
2732 modal ?: ( params : {
@@ -30,13 +35,22 @@ function DatePickerInputWithoutModal(
3035 inputMode : DatePickerInputProps [ 'inputMode' ]
3136 validRange : DatePickerInputProps [ 'validRange' ]
3237 saveLabel : DatePickerInputProps [ 'saveLabel' ]
38+ saveLabelDisabled : DatePickerInputProps [ 'saveLabelDisabled' ]
39+ uppercase : DatePickerInputProps [ 'uppercase' ]
40+ startYear : DatePickerInputProps [ 'startYear' ]
41+ endYear : DatePickerInputProps [ 'endYear' ]
3342 } ) => any
3443 inputButtons ?: any
3544 } ,
3645 ref : any
3746) {
3847 const theme = useTheme ( )
39- const { formattedValue, inputFormat, onChangeText, error } = useDateInput ( {
48+ const {
49+ formattedValue,
50+ inputFormat,
51+ onChangeText : onDateInputChangeText ,
52+ error,
53+ } = useDateInput ( {
4054 locale,
4155 value,
4256 validRange,
@@ -61,20 +75,31 @@ function DatePickerInputWithoutModal(
6175 value = { formattedValue }
6276 keyboardType = { 'number-pad' }
6377 mask = { inputFormat }
64- onChangeText = { onChangeText }
78+ onChangeText = { onDateInputChangeText }
79+ onChange = { ( e ) => onChangeText && onChangeText ( e . nativeEvent . text ) }
6580 keyboardAppearance = { theme . dark ? 'dark' : 'default' }
6681 error = { ( ! ! error && ! hideValidationErrors ) || ! ! hasError }
6782 style = { [ styles . input , style ] }
6883 />
6984 { inputButtons }
7085 </ View >
7186 { error && ! hideValidationErrors ? (
72- < HelperText style = { styles . helperText } type = "error" visible = { ! ! error } >
87+ < HelperText type = "error" visible = { ! ! error } >
7388 { error }
7489 </ HelperText >
7590 ) : null }
7691 </ View >
77- { modal ?.( { value, locale, inputMode, validRange, saveLabel } ) }
92+ { modal ?.( {
93+ value,
94+ locale,
95+ inputMode,
96+ validRange,
97+ saveLabel,
98+ saveLabelDisabled,
99+ uppercase,
100+ startYear,
101+ endYear,
102+ } ) }
78103 </ >
79104 )
80105}
@@ -107,8 +132,5 @@ const styles = StyleSheet.create({
107132 input : {
108133 flexGrow : 1 ,
109134 } ,
110- helperText : {
111- // flex: 1,
112- } ,
113135} )
114136export default React . forwardRef ( DatePickerInputWithoutModal )
0 commit comments