Skip to content

Commit

Permalink
Merge pull request #433 from renefitzke1/master
Browse files Browse the repository at this point in the history
Fix edit-input-field to respect disabling format in label and placeholder
  • Loading branch information
iM-GeeKy authored Nov 11, 2024
2 parents 8573989 + 241ed16 commit 50137ef
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Date/CalendarEdit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ function CalendarEdit({
validRange,
locale,
inputEnabled,
withDateFormatInLabel,
placeholder,
}: {
mode: ModeType
label?: string
Expand All @@ -35,6 +37,8 @@ function CalendarEdit({
validRange: ValidRangeType | undefined
locale: string
inputEnabled?: boolean
withDateFormatInLabel?: boolean
placeholder?: string
}) {
const dateInput = useRef<TextInputNative | null>(null)
const startInput = useRef<TextInputNative | null>(null)
Expand Down Expand Up @@ -93,6 +97,8 @@ function CalendarEdit({
withModal={false}
autoComplete={'off'}
inputEnabled={inputEnabled}
withDateFormatInLabel={withDateFormatInLabel}
placeholder={placeholder}
/>
) : null}
{mode === 'range' ? (
Expand All @@ -110,6 +116,8 @@ function CalendarEdit({
withModal={false}
autoComplete={'off'}
inputEnabled={inputEnabled}
withDateFormatInLabel={withDateFormatInLabel}
placeholder={placeholder}
/>
<View style={styles.separator} />
<DatePickerInputWithoutModal
Expand All @@ -124,6 +132,8 @@ function CalendarEdit({
withModal={false}
autoComplete="off"
inputEnabled={inputEnabled}
withDateFormatInLabel={withDateFormatInLabel}
placeholder={placeholder}
/>
</View>
) : null}
Expand Down
2 changes: 2 additions & 0 deletions src/Date/DatePickerInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ function DatePickerInput(
presentationStyle={presentationStyle}
label={rest.label as any}
startWeekOnMonday={startWeekOnMonday}
withDateFormatInLabel={rest.withDateFormatInLabel}
placeholder={rest.placeholder}
/>
) : null
}
Expand Down
2 changes: 2 additions & 0 deletions src/Date/DatePickerModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ export function DatePickerModal(
disableSafeTop={disableStatusBarPadding}
disableStatusBar={disableStatusBar}
statusBarOnTopOfBackdrop={isPageSheet || statusBarOnTopOfBackdrop}
withDateFormatInLabel={props.withDateFormatInLabel}
placeholder={props.placeholder}
/>
</View>
</View>
Expand Down
2 changes: 2 additions & 0 deletions src/Date/DatePickerModalContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,8 @@ export function DatePickerModalContent(
validRange={validRange}
locale={locale}
inputEnabled={props.inputEnabled}
withDateFormatInLabel={props.withDateFormatInLabel}
placeholder={props.placeholder}
/>
}
/>
Expand Down
2 changes: 2 additions & 0 deletions src/Date/DatePickerModalContentHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ export interface HeaderPickProps {
moreLabel?: string
label?: string
emptyLabel?: string
withDateFormatInLabel?: boolean
placeholder?: string
saveLabel?: string
uppercase?: boolean
headerSeparator?: string
Expand Down

0 comments on commit 50137ef

Please sign in to comment.