Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add disableStatusBarPadding to date picker input #322

Merged
merged 3 commits into from
Sep 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docusaurus/docs/date-picker/input-date-picker.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@ The end year when the component is rendered. Defaults to `2200`.
`Type: boolean | undefined`
Flag indicating if the component should be enabled or not. Behavior similarly to `disabled`. Defaults to `true`.

**disableStatusBarPadding**
`Type: boolean | undefined`
Flag indicating if the status bar padding should be enabled or not. Defaults to `false`.

**presentationStyle**
`Type: 'fullScreen' | 'pageSheet' | 'formSheet' | 'overFullScreen'`
Determines the visual presentation style of the date picker modal. This prop allows you to define how the modal appears on the screen when it is displayed.
Expand Down
4 changes: 4 additions & 0 deletions docusaurus/docs/date-picker/multiple-dates-picker.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,10 @@ The edit icon used to toggle between calendar and input. Defaults to `pencil`. Y
`Type: string | undefined`
The edit icon used to toggle between input and calendar. Defaults to `calendar`. You can pass the name of an icon from [MaterialCommunityIcons](https://materialdesignicons.com/).

**disableStatusBarPadding**
`Type: boolean | undefined`
Flag indicating if the status bar padding should be enabled or not. Defaults to `false`.

**presentationStyle**
`Type: 'fullScreen' | 'pageSheet' | 'formSheet' | 'overFullScreen'`
Determines the visual presentation style of the date picker modal. This prop allows you to define how the modal appears on the screen when it is displayed.
Expand Down
4 changes: 4 additions & 0 deletions docusaurus/docs/date-picker/range-date-picker.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,10 @@ The edit icon used to toggle between input and calendar. Defaults to `calendar`.
`Type: boolean | undefined`
Flag indicating if the component should be enabled or not. Defaults to `true`.

**disableStatusBarPadding**
`Type: boolean | undefined`
Flag indicating if the status bar padding should be enabled or not. Defaults to `false`.

**presentationStyle**
`Type: 'fullScreen' | 'pageSheet' | 'formSheet' | 'overFullScreen'`
Determines the visual presentation style of the date picker modal. This prop allows you to define how the modal appears on the screen when it is displayed.
Expand Down
4 changes: 4 additions & 0 deletions docusaurus/docs/date-picker/single-date-picker.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,10 @@ The edit icon used to toggle between input and calendar. Defaults to `calendar`.
`Type: boolean | undefined`
Flag indicating if the component should be enabled or not. Defaults to `true`.

**disableStatusBarPadding**
`Type: boolean | undefined`
Flag indicating if the status bar padding should be enabled or not. Defaults to `false`.

**presentationStyle**
`Type: 'fullScreen' | 'pageSheet' | 'formSheet' | 'overFullScreen'`
Determines the visual presentation style of the date picker modal. This prop allows you to define how the modal appears on the screen when it is displayed.
Expand Down
1 change: 1 addition & 0 deletions src/Date/DatePickerInput.shared.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export type DatePickerInputProps = {
endYear?: number
onChangeText?: (text: string | undefined) => void
inputEnabled?: boolean
disableStatusBarPadding?: boolean
} & Omit<
React.ComponentProps<typeof TextInput>,
'value' | 'onChange' | 'onChangeText' | 'inputMode'
Expand Down
2 changes: 2 additions & 0 deletions src/Date/DatePickerInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ function DatePickerInput(
startYear,
endYear,
inputEnabled,
disableStatusBarPadding,
}) =>
withModal ? (
<DatePickerModal
Expand All @@ -70,6 +71,7 @@ function DatePickerInput(
startYear={startYear ?? 1800}
endYear={endYear ?? 2200}
inputEnabled={inputEnabled}
disableStatusBarPadding={disableStatusBarPadding ?? false}
/>
) : null
}
Expand Down
3 changes: 3 additions & 0 deletions src/Date/DatePickerInputWithoutModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ function DatePickerInputWithoutModal(
endYear,
onChangeText,
inputEnabled,
disableStatusBarPadding,
...rest
}: DatePickerInputProps & {
modal?: (params: {
Expand All @@ -41,6 +42,7 @@ function DatePickerInputWithoutModal(
startYear: DatePickerInputProps['startYear']
endYear: DatePickerInputProps['endYear']
inputEnabled: DatePickerInputProps['inputEnabled']
disableStatusBarPadding: DatePickerInputProps['disableStatusBarPadding']
}) => any
inputButton?: React.ReactNode
},
Expand Down Expand Up @@ -113,6 +115,7 @@ function DatePickerInputWithoutModal(
startYear,
endYear,
inputEnabled,
disableStatusBarPadding,
})}
</>
)
Expand Down