Skip to content

Commit 3b33e93

Browse files
authored
Merge pull request #338 from roysc1984/add-animaiton-input-date
add animationType to DatePickerInput
2 parents a522f55 + 8b642da commit 3b33e93

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

docusaurus/docs/date-picker/input-date-picker.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,10 @@ Determines the visual presentation style of the date picker modal. This prop all
136136
- `'formSheet'`: Renders the modal as a smaller form-style sheet.
137137
- `'overFullScreen'`: Overlays the modal on top of the content, allowing interaction with the underlying content.
138138

139+
**animationType**
140+
`Type: 'slide' | 'fade' | 'none' | undefined`
141+
The animation used when opening the date picker modal. Defaults to `'slide'`.
142+
139143
For example, if you set `presentationStyle` to `'pageSheet'`, the modal will be presented as a card-like sheet.
140144

141145
- Other [react-native TextInput props](https://reactnative.dev/docs/textinput#props).\*

src/Date/DatePickerInput.shared.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ export type DatePickerInputProps = {
2525
onChangeText?: (text: string | undefined) => void
2626
inputEnabled?: boolean
2727
disableStatusBarPadding?: boolean
28+
animationType?: 'slide' | 'fade' | 'none'
2829
} & Omit<
2930
React.ComponentProps<typeof TextInput>,
3031
'value' | 'onChange' | 'onChangeText' | 'inputMode'

src/Date/DatePickerInput.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ function DatePickerInput(
1212
{
1313
withModal = true,
1414
calendarIcon = 'calendar',
15+
animationType = 'slide',
1516
...rest
1617
}: DatePickerInputProps,
1718
ref: any
@@ -77,6 +78,7 @@ function DatePickerInput(
7778
endYear={endYear ?? 2200}
7879
inputEnabled={inputEnabled}
7980
disableStatusBarPadding={disableStatusBarPadding ?? false}
81+
animationType={animationType}
8082
/>
8183
) : null
8284
}

0 commit comments

Comments
 (0)