Skip to content

Commit 50137ef

Browse files
authored
Merge pull request #433 from renefitzke1/master
Fix edit-input-field to respect disabling format in label and placeholder
2 parents 8573989 + 241ed16 commit 50137ef

File tree

5 files changed

+18
-0
lines changed

5 files changed

+18
-0
lines changed

src/Date/CalendarEdit.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ function CalendarEdit({
2424
validRange,
2525
locale,
2626
inputEnabled,
27+
withDateFormatInLabel,
28+
placeholder,
2729
}: {
2830
mode: ModeType
2931
label?: string
@@ -35,6 +37,8 @@ function CalendarEdit({
3537
validRange: ValidRangeType | undefined
3638
locale: string
3739
inputEnabled?: boolean
40+
withDateFormatInLabel?: boolean
41+
placeholder?: string
3842
}) {
3943
const dateInput = useRef<TextInputNative | null>(null)
4044
const startInput = useRef<TextInputNative | null>(null)
@@ -93,6 +97,8 @@ function CalendarEdit({
9397
withModal={false}
9498
autoComplete={'off'}
9599
inputEnabled={inputEnabled}
100+
withDateFormatInLabel={withDateFormatInLabel}
101+
placeholder={placeholder}
96102
/>
97103
) : null}
98104
{mode === 'range' ? (
@@ -110,6 +116,8 @@ function CalendarEdit({
110116
withModal={false}
111117
autoComplete={'off'}
112118
inputEnabled={inputEnabled}
119+
withDateFormatInLabel={withDateFormatInLabel}
120+
placeholder={placeholder}
113121
/>
114122
<View style={styles.separator} />
115123
<DatePickerInputWithoutModal
@@ -124,6 +132,8 @@ function CalendarEdit({
124132
withModal={false}
125133
autoComplete="off"
126134
inputEnabled={inputEnabled}
135+
withDateFormatInLabel={withDateFormatInLabel}
136+
placeholder={placeholder}
127137
/>
128138
</View>
129139
) : null}

src/Date/DatePickerInput.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ function DatePickerInput(
8787
presentationStyle={presentationStyle}
8888
label={rest.label as any}
8989
startWeekOnMonday={startWeekOnMonday}
90+
withDateFormatInLabel={rest.withDateFormatInLabel}
91+
placeholder={rest.placeholder}
9092
/>
9193
) : null
9294
}

src/Date/DatePickerModal.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ export function DatePickerModal(
101101
disableSafeTop={disableStatusBarPadding}
102102
disableStatusBar={disableStatusBar}
103103
statusBarOnTopOfBackdrop={isPageSheet || statusBarOnTopOfBackdrop}
104+
withDateFormatInLabel={props.withDateFormatInLabel}
105+
placeholder={props.placeholder}
104106
/>
105107
</View>
106108
</View>

src/Date/DatePickerModalContent.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,8 @@ export function DatePickerModalContent(
212212
validRange={validRange}
213213
locale={locale}
214214
inputEnabled={props.inputEnabled}
215+
withDateFormatInLabel={props.withDateFormatInLabel}
216+
placeholder={props.placeholder}
215217
/>
216218
}
217219
/>

src/Date/DatePickerModalContentHeader.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ export interface HeaderPickProps {
1212
moreLabel?: string
1313
label?: string
1414
emptyLabel?: string
15+
withDateFormatInLabel?: boolean
16+
placeholder?: string
1517
saveLabel?: string
1618
uppercase?: boolean
1719
headerSeparator?: string

0 commit comments

Comments
 (0)