Skip to content

Commit a9cb8e7

Browse files
authored
Merge pull request #322 from web-ridge/date-picker-input-disableStatusBarPadding
chore: add disableStatusBarPadding to date picker input
2 parents ef8d720 + 6265717 commit a9cb8e7

File tree

7 files changed

+22
-0
lines changed

7 files changed

+22
-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
@@ -111,6 +111,10 @@ The end year when the component is rendered. Defaults to `2200`.
111111
`Type: boolean | undefined`
112112
Flag indicating if the component should be enabled or not. Behavior similarly to `disabled`. Defaults to `true`.
113113

114+
**disableStatusBarPadding**
115+
`Type: boolean | undefined`
116+
Flag indicating if the status bar padding should be enabled or not. Defaults to `false`.
117+
114118
**presentationStyle**
115119
`Type: 'fullScreen' | 'pageSheet' | 'formSheet' | 'overFullScreen'`
116120
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.

docusaurus/docs/date-picker/multiple-dates-picker.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,10 @@ The edit icon used to toggle between calendar and input. Defaults to `pencil`. Y
143143
`Type: string | undefined`
144144
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/).
145145

146+
**disableStatusBarPadding**
147+
`Type: boolean | undefined`
148+
Flag indicating if the status bar padding should be enabled or not. Defaults to `false`.
149+
146150
**presentationStyle**
147151
`Type: 'fullScreen' | 'pageSheet' | 'formSheet' | 'overFullScreen'`
148152
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.

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,10 @@ The edit icon used to toggle between input and calendar. Defaults to `calendar`.
150150
`Type: boolean | undefined`
151151
Flag indicating if the component should be enabled or not. Defaults to `true`.
152152

153+
**disableStatusBarPadding**
154+
`Type: boolean | undefined`
155+
Flag indicating if the status bar padding should be enabled or not. Defaults to `false`.
156+
153157
**presentationStyle**
154158
`Type: 'fullScreen' | 'pageSheet' | 'formSheet' | 'overFullScreen'`
155159
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.

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,10 @@ The edit icon used to toggle between input and calendar. Defaults to `calendar`.
137137
`Type: boolean | undefined`
138138
Flag indicating if the component should be enabled or not. Defaults to `true`.
139139

140+
**disableStatusBarPadding**
141+
`Type: boolean | undefined`
142+
Flag indicating if the status bar padding should be enabled or not. Defaults to `false`.
143+
140144
**presentationStyle**
141145
`Type: 'fullScreen' | 'pageSheet' | 'formSheet' | 'overFullScreen'`
142146
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.

src/Date/DatePickerInput.shared.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export type DatePickerInputProps = {
2121
endYear?: number
2222
onChangeText?: (text: string | undefined) => void
2323
inputEnabled?: boolean
24+
disableStatusBarPadding?: boolean
2425
} & Omit<
2526
React.ComponentProps<typeof TextInput>,
2627
'value' | 'onChange' | 'onChangeText' | 'inputMode'

src/Date/DatePickerInput.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ function DatePickerInput(
5353
startYear,
5454
endYear,
5555
inputEnabled,
56+
disableStatusBarPadding,
5657
}) =>
5758
withModal ? (
5859
<DatePickerModal
@@ -70,6 +71,7 @@ function DatePickerInput(
7071
startYear={startYear ?? 1800}
7172
endYear={endYear ?? 2200}
7273
inputEnabled={inputEnabled}
74+
disableStatusBarPadding={disableStatusBarPadding ?? false}
7375
/>
7476
) : null
7577
}

src/Date/DatePickerInputWithoutModal.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ function DatePickerInputWithoutModal(
2828
endYear,
2929
onChangeText,
3030
inputEnabled,
31+
disableStatusBarPadding,
3132
...rest
3233
}: DatePickerInputProps & {
3334
modal?: (params: {
@@ -41,6 +42,7 @@ function DatePickerInputWithoutModal(
4142
startYear: DatePickerInputProps['startYear']
4243
endYear: DatePickerInputProps['endYear']
4344
inputEnabled: DatePickerInputProps['inputEnabled']
45+
disableStatusBarPadding: DatePickerInputProps['disableStatusBarPadding']
4446
}) => any
4547
inputButton?: React.ReactNode
4648
},
@@ -113,6 +115,7 @@ function DatePickerInputWithoutModal(
113115
startYear,
114116
endYear,
115117
inputEnabled,
118+
disableStatusBarPadding,
116119
})}
117120
</>
118121
)

0 commit comments

Comments
 (0)