Skip to content

Commit

Permalink
Merge pull request #322 from web-ridge/date-picker-input-disableStatu…
Browse files Browse the repository at this point in the history
…sBarPadding

chore: add disableStatusBarPadding to date picker input
  • Loading branch information
iM-GeeKy authored Sep 4, 2023
2 parents ef8d720 + 6265717 commit a9cb8e7
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 0 deletions.
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

0 comments on commit a9cb8e7

Please sign in to comment.