File tree Expand file tree Collapse file tree 4 files changed +5
-6
lines changed Expand file tree Collapse file tree 4 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,6 @@ export type DatePickerInputProps = {
2121 endYear ?: number
2222 onChangeText ?: ( text : string | undefined ) => void
2323 inputEnabled ?: boolean
24- inputButton ?: React . ReactNode
2524} & Omit <
2625 React . ComponentProps < typeof TextInput > ,
2726 'value' | 'onChange' | 'onChangeText' | 'inputMode'
Original file line number Diff line number Diff line change 11import * as React from 'react'
22
3- import { IconButton } from 'react-native-paper'
3+ import { TextInput } from 'react-native-paper'
44import DatePickerModal from './DatePickerModal'
55import { useLatest } from '../utils'
66import type { DatePickerInputProps } from './DatePickerInput.shared'
@@ -33,7 +33,7 @@ function DatePickerInput(
3333 { ...rest }
3434 inputButton = {
3535 withModal ? (
36- < IconButton
36+ < TextInput . Icon
3737 size = { 24 }
3838 icon = { calendarIcon }
3939 disabled = { rest . disabled }
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ function DatePickerInputWithoutModal(
4242 endYear : DatePickerInputProps [ 'endYear' ]
4343 inputEnabled : DatePickerInputProps [ 'inputEnabled' ]
4444 } ) => any
45- inputButtons ?: any
45+ inputButton ?: React . ReactNode
4646 } ,
4747 ref : any
4848) {
@@ -76,7 +76,6 @@ function DatePickerInputWithoutModal(
7676 < View style = { styles . root } >
7777 < View style = { styles . inputContainer } >
7878 < TextInputWithMask
79- inputButton = { inputButton }
8079 { ...rest }
8180 ref = { ref }
8281 label = { getLabel ( {
@@ -94,6 +93,7 @@ function DatePickerInputWithoutModal(
9493 keyboardAppearance = { theme . dark ? 'dark' : 'default' }
9594 error = { ( ! ! error && ! hideValidationErrors ) || ! ! hasError }
9695 style = { [ styles . input , style ] }
96+ inputButton = { inputButton }
9797 />
9898 </ View >
9999 { error && ! hideValidationErrors ? (
Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ function TextInputWithMask(
8585 onChange && onChange ( e )
8686 } }
8787 maxLength = { 10 }
88- right = { < TextInput . Icon icon = { ( ) => inputButton } /> }
88+ right = { inputButton }
8989 />
9090 </ >
9191 )
You can’t perform that action at this time.
0 commit comments