File tree Expand file tree Collapse file tree 3 files changed +20
-1
lines changed
docusaurus/docs/date-picker Expand file tree Collapse file tree 3 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -67,6 +67,18 @@ Callback event when the component text input changes.
6767` Type: 'flat' | 'outlined' `
6868See [ react-native-paper text-input] ( https://callstack.github.io/react-native-paper/text-input.html#mode ) .
6969
70+ ** iconSize**
71+ ` Type: Number `
72+ Specifies the size of the icon in pixels.
73+
74+ ** iconColor**
75+ ` Type: String `
76+ Sets the color of the icon.
77+
78+ ** iconStyle**
79+ ` Type: React.CSSProperties `
80+ Defines the CSS styles for the icon element.
81+
7082** validRange**
7183`Type: {
7284 startDate: Date | undefined,
Original file line number Diff line number Diff line change @@ -14,6 +14,9 @@ export type DatePickerInputProps = {
1414 hasError ?: boolean
1515 onValidationError ?: ( ( error : string | null ) => void ) | undefined
1616 calendarIcon ?: string
17+ iconSize ?: number
18+ iconStyle ?: React . CSSProperties
19+ iconColor ?: string
1720 saveLabel ?: string
1821 saveLabelDisabled ?: boolean
1922 uppercase ?: boolean
Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ import DatePickerModal from './DatePickerModal'
55import { useLatest } from '../utils'
66import type { DatePickerInputProps } from './DatePickerInput.shared'
77import DatePickerInputWithoutModal from './DatePickerInputWithoutModal'
8+ import { StyleProp } from 'react-native'
9+ import { ViewStyle } from 'react-native'
810
911function DatePickerInput (
1012 {
@@ -34,10 +36,12 @@ function DatePickerInput(
3436 inputButton = {
3537 withModal ? (
3638 < TextInput . Icon
37- size = { 24 }
39+ size = { rest . iconSize ?? 24 }
3840 icon = { calendarIcon }
41+ color = { rest . iconColor ?? undefined }
3942 disabled = { rest . disabled }
4043 onPress = { ( ) => setVisible ( true ) }
44+ style = { rest . iconStyle as StyleProp < ViewStyle > }
4145 />
4246 ) : null
4347 }
You can’t perform that action at this time.
0 commit comments