From ccc99d8df19c1d5cf1569d24d8251f4aca72bf87 Mon Sep 17 00:00:00 2001 From: Brandon Fitzwater Date: Sun, 3 Sep 2023 18:31:21 -0400 Subject: [PATCH 1/3] chore: add new prop to date picker input --- docusaurus/docs/date-picker/input-date-picker.md | 4 ++++ docusaurus/docs/date-picker/multiple-dates-picker.md | 8 ++++++++ docusaurus/docs/date-picker/range-date-picker.md | 4 ++++ docusaurus/docs/date-picker/single-date-picker.md | 4 ++++ src/Date/DatePickerInput.shared.tsx | 1 + src/Date/DatePickerInput.tsx | 2 ++ src/Date/DatePickerInputWithoutModal.tsx | 3 +++ 7 files changed, 26 insertions(+) diff --git a/docusaurus/docs/date-picker/input-date-picker.md b/docusaurus/docs/date-picker/input-date-picker.md index a68f215d..7898ba24 100644 --- a/docusaurus/docs/date-picker/input-date-picker.md +++ b/docusaurus/docs/date-picker/input-date-picker.md @@ -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. diff --git a/docusaurus/docs/date-picker/multiple-dates-picker.md b/docusaurus/docs/date-picker/multiple-dates-picker.md index f72bff4f..ed68db08 100644 --- a/docusaurus/docs/date-picker/multiple-dates-picker.md +++ b/docusaurus/docs/date-picker/multiple-dates-picker.md @@ -143,6 +143,14 @@ 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/). +**inputEnabled** +`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. diff --git a/docusaurus/docs/date-picker/range-date-picker.md b/docusaurus/docs/date-picker/range-date-picker.md index b53af359..bb9ddd63 100644 --- a/docusaurus/docs/date-picker/range-date-picker.md +++ b/docusaurus/docs/date-picker/range-date-picker.md @@ -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. diff --git a/docusaurus/docs/date-picker/single-date-picker.md b/docusaurus/docs/date-picker/single-date-picker.md index 6955d06b..8d3d573c 100644 --- a/docusaurus/docs/date-picker/single-date-picker.md +++ b/docusaurus/docs/date-picker/single-date-picker.md @@ -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. diff --git a/src/Date/DatePickerInput.shared.tsx b/src/Date/DatePickerInput.shared.tsx index ddf332c2..76e06a9a 100644 --- a/src/Date/DatePickerInput.shared.tsx +++ b/src/Date/DatePickerInput.shared.tsx @@ -21,6 +21,7 @@ export type DatePickerInputProps = { endYear?: number onChangeText?: (text: string | undefined) => void inputEnabled?: boolean + disableStatusBarPadding?: boolean } & Omit< React.ComponentProps, 'value' | 'onChange' | 'onChangeText' | 'inputMode' diff --git a/src/Date/DatePickerInput.tsx b/src/Date/DatePickerInput.tsx index 627d8aff..e76c1bb9 100644 --- a/src/Date/DatePickerInput.tsx +++ b/src/Date/DatePickerInput.tsx @@ -53,6 +53,7 @@ function DatePickerInput( startYear, endYear, inputEnabled, + disableStatusBarPadding, }) => withModal ? ( ) : null } diff --git a/src/Date/DatePickerInputWithoutModal.tsx b/src/Date/DatePickerInputWithoutModal.tsx index 5bc26d32..140f8c8a 100644 --- a/src/Date/DatePickerInputWithoutModal.tsx +++ b/src/Date/DatePickerInputWithoutModal.tsx @@ -28,6 +28,7 @@ function DatePickerInputWithoutModal( endYear, onChangeText, inputEnabled, + disableStatusBarPadding, ...rest }: DatePickerInputProps & { modal?: (params: { @@ -41,6 +42,7 @@ function DatePickerInputWithoutModal( startYear: DatePickerInputProps['startYear'] endYear: DatePickerInputProps['endYear'] inputEnabled: DatePickerInputProps['inputEnabled'] + disableStatusBarPadding: DatePickerInputProps['disableStatusBarPadding'] }) => any inputButton?: React.ReactNode }, @@ -113,6 +115,7 @@ function DatePickerInputWithoutModal( startYear, endYear, inputEnabled, + disableStatusBarPadding })} ) From 2ee8016f3690b837bbe2ff221d591aede0f63755 Mon Sep 17 00:00:00 2001 From: Brandon Fitzwater Date: Sun, 3 Sep 2023 18:45:10 -0400 Subject: [PATCH 2/3] chore: fix linting error --- src/Date/DatePickerInputWithoutModal.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Date/DatePickerInputWithoutModal.tsx b/src/Date/DatePickerInputWithoutModal.tsx index 140f8c8a..36fd0569 100644 --- a/src/Date/DatePickerInputWithoutModal.tsx +++ b/src/Date/DatePickerInputWithoutModal.tsx @@ -115,7 +115,7 @@ function DatePickerInputWithoutModal( startYear, endYear, inputEnabled, - disableStatusBarPadding + disableStatusBarPadding, })} ) From 6265717375bc70a091e45fbd51b600d45098b0e3 Mon Sep 17 00:00:00 2001 From: Brandon Fitzwater Date: Sun, 3 Sep 2023 19:08:55 -0400 Subject: [PATCH 3/3] chore: remove unavailable prop from docs --- docusaurus/docs/date-picker/multiple-dates-picker.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/docusaurus/docs/date-picker/multiple-dates-picker.md b/docusaurus/docs/date-picker/multiple-dates-picker.md index ed68db08..de00f3b4 100644 --- a/docusaurus/docs/date-picker/multiple-dates-picker.md +++ b/docusaurus/docs/date-picker/multiple-dates-picker.md @@ -143,10 +143,6 @@ 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/). -**inputEnabled** -`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`.