From 241ed16678f6a65d5a4c5045c875da9e51f52720 Mon Sep 17 00:00:00 2001 From: Rene Fitzke Date: Tue, 5 Nov 2024 10:45:40 +0100 Subject: [PATCH] Pass placeholder through to edit input-field --- src/Date/CalendarEdit.tsx | 5 +++++ src/Date/DatePickerInput.tsx | 1 + src/Date/DatePickerModal.tsx | 1 + src/Date/DatePickerModalContent.tsx | 1 + src/Date/DatePickerModalContentHeader.tsx | 1 + 5 files changed, 9 insertions(+) diff --git a/src/Date/CalendarEdit.tsx b/src/Date/CalendarEdit.tsx index ea76b2a..33d929d 100644 --- a/src/Date/CalendarEdit.tsx +++ b/src/Date/CalendarEdit.tsx @@ -25,6 +25,7 @@ function CalendarEdit({ locale, inputEnabled, withDateFormatInLabel, + placeholder, }: { mode: ModeType label?: string @@ -37,6 +38,7 @@ function CalendarEdit({ locale: string inputEnabled?: boolean withDateFormatInLabel?: boolean + placeholder?: string }) { const dateInput = useRef(null) const startInput = useRef(null) @@ -96,6 +98,7 @@ function CalendarEdit({ autoComplete={'off'} inputEnabled={inputEnabled} withDateFormatInLabel={withDateFormatInLabel} + placeholder={placeholder} /> ) : null} {mode === 'range' ? ( @@ -114,6 +117,7 @@ function CalendarEdit({ autoComplete={'off'} inputEnabled={inputEnabled} withDateFormatInLabel={withDateFormatInLabel} + placeholder={placeholder} /> ) : null} diff --git a/src/Date/DatePickerInput.tsx b/src/Date/DatePickerInput.tsx index 713e739..cf951ee 100644 --- a/src/Date/DatePickerInput.tsx +++ b/src/Date/DatePickerInput.tsx @@ -88,6 +88,7 @@ function DatePickerInput( label={rest.label as any} startWeekOnMonday={startWeekOnMonday} withDateFormatInLabel={rest.withDateFormatInLabel} + placeholder={rest.placeholder} /> ) : null } diff --git a/src/Date/DatePickerModal.tsx b/src/Date/DatePickerModal.tsx index 212ce35..e8d8dc4 100644 --- a/src/Date/DatePickerModal.tsx +++ b/src/Date/DatePickerModal.tsx @@ -102,6 +102,7 @@ export function DatePickerModal( disableStatusBar={disableStatusBar} statusBarOnTopOfBackdrop={isPageSheet || statusBarOnTopOfBackdrop} withDateFormatInLabel={props.withDateFormatInLabel} + placeholder={props.placeholder} /> diff --git a/src/Date/DatePickerModalContent.tsx b/src/Date/DatePickerModalContent.tsx index 793fe7f..04a0e4f 100644 --- a/src/Date/DatePickerModalContent.tsx +++ b/src/Date/DatePickerModalContent.tsx @@ -213,6 +213,7 @@ export function DatePickerModalContent( locale={locale} inputEnabled={props.inputEnabled} withDateFormatInLabel={props.withDateFormatInLabel} + placeholder={props.placeholder} /> } /> diff --git a/src/Date/DatePickerModalContentHeader.tsx b/src/Date/DatePickerModalContentHeader.tsx index f4ab59f..1d00c14 100644 --- a/src/Date/DatePickerModalContentHeader.tsx +++ b/src/Date/DatePickerModalContentHeader.tsx @@ -13,6 +13,7 @@ export interface HeaderPickProps { label?: string emptyLabel?: string withDateFormatInLabel?: boolean + placeholder?: string saveLabel?: string uppercase?: boolean headerSeparator?: string