File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
packages/react-widgets/src Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ import dates from './dates'
1717import useAutoFocus from './useAutoFocus'
1818import useFocusManager from './useFocusManager'
1919import { notify , useInstanceId } from './WidgetHelpers'
20+ import { Messages } from './messages'
2021
2122type Direction = 'DOWN' | 'UP' | 'LEFT' | 'RIGHT'
2223
@@ -294,6 +295,12 @@ export interface CalendarProps<TLocalizer = unknown>
294295 ) => void
295296 renderDay ?: RenderDayProp
296297 formats ?: DateFormats < InferFormat < TLocalizer > >
298+
299+ messages ?: {
300+ moveBack ?: string
301+ moveForward ?: string
302+ moveToday ?: string
303+ }
297304}
298305
299306/**
Original file line number Diff line number Diff line change @@ -289,7 +289,7 @@ export interface DatePickerProps<TLocalizer = unknown>
289289
290290 formats ?: DateFormats < InferFormat < TLocalizer > >
291291
292- messages ?: {
292+ messages ?: CalendarProps [ 'messages' ] & {
293293 dateButton ?: string
294294 }
295295}
@@ -588,6 +588,10 @@ const DatePicker = React.forwardRef(
588588 max = { max }
589589 bordered = { false }
590590 { ...calendarProps }
591+ messages = { {
592+ ...messages ,
593+ ...calendarProps ?. messages ,
594+ } }
591595 tabIndex = { - 1 }
592596 value = { value }
593597 autoFocus = { false }
You can’t perform that action at this time.
0 commit comments