Skip to content

Commit 92197d1

Browse files
fix: not slide on web and add label to modal
1 parent 1c70b56 commit 92197d1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Date/DatePickerInput.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ import DatePickerModal from './DatePickerModal'
55
import { useLatest } from '../utils'
66
import type { DatePickerInputProps } from './DatePickerInput.shared'
77
import DatePickerInputWithoutModal from './DatePickerInputWithoutModal'
8-
import { StyleProp, ViewStyle } from 'react-native'
8+
import { Platform, StyleProp, ViewStyle } from 'react-native'
99

1010
function DatePickerInput(
1111
{
1212
withModal = true,
1313
calendarIcon = 'calendar',
14-
animationType = 'slide',
14+
animationType = Platform.select({ web: 'none', default: 'slide' }),
1515
presentationStyle = 'overFullScreen',
1616
...rest
1717
}: DatePickerInputProps,
@@ -80,6 +80,7 @@ function DatePickerInput(
8080
disableStatusBarPadding={disableStatusBarPadding ?? false}
8181
animationType={animationType}
8282
presentationStyle={presentationStyle}
83+
label={rest.label as any}
8384
/>
8485
) : null
8586
}

0 commit comments

Comments
 (0)