From 62b1bc1c8f7c235e54eb7da39d642ce6f706930a Mon Sep 17 00:00:00 2001 From: Alberto Osio Date: Thu, 6 May 2021 16:26:17 +0200 Subject: [PATCH] fix: pass locale property to CalendarEdit --- src/Date/CalendarEdit.tsx | 5 +++++ src/Date/DatePickerModalContent.tsx | 2 ++ 2 files changed, 7 insertions(+) diff --git a/src/Date/CalendarEdit.tsx b/src/Date/CalendarEdit.tsx index c85dea46..3ade1994 100644 --- a/src/Date/CalendarEdit.tsx +++ b/src/Date/CalendarEdit.tsx @@ -21,6 +21,7 @@ function CalendarEdit({ collapsed, onChange, validRange, + locale, }: { mode: ModeType label?: string @@ -30,6 +31,7 @@ function CalendarEdit({ collapsed: boolean onChange: (s: LocalState) => any validRange: ValidRangeType | undefined + locale?: undefined | string }) { const dateInput = React.useRef(null) const startInput = React.useRef(null) @@ -84,6 +86,7 @@ function CalendarEdit({ onChange={(date) => onChange({ ...state, date })} onSubmitEditing={onSubmitInput} validRange={validRange} + locale={locale} /> ) : null} {mode === 'range' ? ( @@ -96,6 +99,7 @@ function CalendarEdit({ returnKeyType={'next'} onSubmitEditing={onSubmitStartInput} validRange={validRange} + locale={locale} /> ) : null} diff --git a/src/Date/DatePickerModalContent.tsx b/src/Date/DatePickerModalContent.tsx index e42f2b32..c7abc155 100644 --- a/src/Date/DatePickerModalContent.tsx +++ b/src/Date/DatePickerModalContent.tsx @@ -28,6 +28,7 @@ export type LocalState = { interface DatePickerModalContentBaseProps { inputFormat?: string + locale?: undefined | string onDismiss: () => any disableSafeTop?: boolean } @@ -180,6 +181,7 @@ export function DatePickerModalContent( collapsed={collapsed} onChange={onInnerChange} validRange={validRange} + locale={locale} /> } />