Skip to content

Commit 62b1bc1

Browse files
committed
fix: pass locale property to CalendarEdit
1 parent 99c8e3e commit 62b1bc1

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/Date/CalendarEdit.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ function CalendarEdit({
2121
collapsed,
2222
onChange,
2323
validRange,
24+
locale,
2425
}: {
2526
mode: ModeType
2627
label?: string
@@ -30,6 +31,7 @@ function CalendarEdit({
3031
collapsed: boolean
3132
onChange: (s: LocalState) => any
3233
validRange: ValidRangeType | undefined
34+
locale?: undefined | string
3335
}) {
3436
const dateInput = React.useRef<TextInputNative | null>(null)
3537
const startInput = React.useRef<TextInputNative | null>(null)
@@ -84,6 +86,7 @@ function CalendarEdit({
8486
onChange={(date) => onChange({ ...state, date })}
8587
onSubmitEditing={onSubmitInput}
8688
validRange={validRange}
89+
locale={locale}
8790
/>
8891
) : null}
8992
{mode === 'range' ? (
@@ -96,6 +99,7 @@ function CalendarEdit({
9699
returnKeyType={'next'}
97100
onSubmitEditing={onSubmitStartInput}
98101
validRange={validRange}
102+
locale={locale}
99103
/>
100104
<View style={styles.separator} />
101105
<CalendarInput
@@ -106,6 +110,7 @@ function CalendarEdit({
106110
isEndDate
107111
onSubmitEditing={onSubmitEndInput}
108112
validRange={validRange}
113+
locale={locale}
109114
/>
110115
</>
111116
) : null}

src/Date/DatePickerModalContent.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ export type LocalState = {
2828

2929
interface DatePickerModalContentBaseProps {
3030
inputFormat?: string
31+
locale?: undefined | string
3132
onDismiss: () => any
3233
disableSafeTop?: boolean
3334
}
@@ -180,6 +181,7 @@ export function DatePickerModalContent(
180181
collapsed={collapsed}
181182
onChange={onInnerChange}
182183
validRange={validRange}
184+
locale={locale}
183185
/>
184186
}
185187
/>

0 commit comments

Comments
 (0)