@mui/x-date-pickers 8.0.0-beta.1 → 8.0.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +235 -0
- package/DateCalendar/DateCalendar.js +4 -8
- package/DateCalendar/DayCalendar.js +2 -2
- package/DateField/DateField.js +4 -4
- package/DatePicker/shared.js +3 -9
- package/DateTimeField/DateTimeField.js +4 -4
- package/DateTimePicker/shared.js +3 -13
- package/DesktopDatePicker/DesktopDatePicker.js +2 -1
- package/DesktopDateTimePicker/DesktopDateTimePicker.js +2 -1
- package/DesktopTimePicker/DesktopTimePicker.js +2 -1
- package/DigitalClock/DigitalClock.js +1 -0
- package/LocalizationProvider/LocalizationProvider.d.ts +1 -1
- package/LocalizationProvider/LocalizationProvider.js +2 -2
- package/MobileDatePicker/MobileDatePicker.js +2 -1
- package/MobileDateTimePicker/MobileDateTimePicker.js +9 -1
- package/MobileTimePicker/MobileTimePicker.js +2 -1
- package/MonthCalendar/MonthCalendar.js +4 -9
- package/MultiSectionDigitalClock/MultiSectionDigitalClockSection.js +1 -0
- package/PickersActionBar/PickersActionBar.d.ts +1 -1
- package/PickersActionBar/PickersActionBar.js +21 -3
- package/PickersSectionList/PickersSectionList.d.ts +1 -1
- package/PickersSectionList/PickersSectionList.types.d.ts +2 -6
- package/StaticDatePicker/StaticDatePicker.js +2 -1
- package/StaticDateTimePicker/StaticDateTimePicker.js +9 -1
- package/StaticTimePicker/StaticTimePicker.js +2 -1
- package/TimeField/TimeField.js +4 -4
- package/TimePicker/shared.js +3 -3
- package/YearCalendar/YearCalendar.js +4 -10
- package/esm/DateCalendar/DateCalendar.js +6 -10
- package/esm/DateCalendar/DayCalendar.js +2 -2
- package/esm/DateField/DateField.js +4 -4
- package/esm/DatePicker/shared.js +3 -9
- package/esm/DateTimeField/DateTimeField.js +4 -4
- package/esm/DateTimePicker/shared.js +4 -14
- package/esm/DesktopDatePicker/DesktopDatePicker.js +2 -1
- package/esm/DesktopDateTimePicker/DesktopDateTimePicker.js +2 -1
- package/esm/DesktopTimePicker/DesktopTimePicker.js +2 -1
- package/esm/DigitalClock/DigitalClock.js +1 -0
- package/esm/LocalizationProvider/LocalizationProvider.d.ts +1 -1
- package/esm/LocalizationProvider/LocalizationProvider.js +2 -2
- package/esm/MobileDatePicker/MobileDatePicker.js +2 -1
- package/esm/MobileDateTimePicker/MobileDateTimePicker.js +9 -1
- package/esm/MobileTimePicker/MobileTimePicker.js +2 -1
- package/esm/MonthCalendar/MonthCalendar.js +6 -11
- package/esm/MultiSectionDigitalClock/MultiSectionDigitalClockSection.js +1 -0
- package/esm/PickersActionBar/PickersActionBar.d.ts +1 -1
- package/esm/PickersActionBar/PickersActionBar.js +22 -4
- package/esm/PickersSectionList/PickersSectionList.d.ts +1 -1
- package/esm/PickersSectionList/PickersSectionList.types.d.ts +2 -6
- package/esm/StaticDatePicker/StaticDatePicker.js +2 -1
- package/esm/StaticDateTimePicker/StaticDateTimePicker.js +9 -1
- package/esm/StaticTimePicker/StaticTimePicker.js +2 -1
- package/esm/TimeField/TimeField.js +4 -4
- package/esm/TimePicker/shared.js +3 -3
- package/esm/YearCalendar/YearCalendar.js +5 -11
- package/esm/index.js +1 -1
- package/esm/internals/components/PickerProvider.d.ts +9 -0
- package/esm/internals/hooks/useDesktopPicker/useDesktopPicker.d.ts +1 -0
- package/esm/internals/hooks/useDesktopPicker/useDesktopPicker.js +9 -3
- package/esm/internals/hooks/useDesktopPicker/useDesktopPicker.types.d.ts +7 -0
- package/esm/internals/hooks/useField/buildSectionsFromFormat.js +1 -1
- package/esm/internals/hooks/useField/syncSelectionToDOM.d.ts +9 -0
- package/esm/internals/hooks/useField/syncSelectionToDOM.js +50 -0
- package/esm/internals/hooks/useField/useField.types.d.ts +8 -1
- package/esm/internals/hooks/useField/useField.utils.d.ts +1 -3
- package/esm/internals/hooks/useField/useField.utils.js +0 -57
- package/esm/internals/hooks/useField/useFieldHiddenInputProps.d.ts +20 -0
- package/esm/internals/hooks/useField/useFieldHiddenInputProps.js +31 -0
- package/esm/internals/hooks/useField/useFieldInternalPropsWithDefaults.js +8 -10
- package/esm/internals/hooks/useField/useFieldRootHandleKeyDown.js +1 -0
- package/esm/internals/hooks/useField/useFieldRootProps.d.ts +32 -0
- package/esm/internals/hooks/useField/useFieldRootProps.js +150 -0
- package/esm/internals/hooks/useField/useFieldSectionContainerProps.d.ts +15 -0
- package/esm/internals/hooks/useField/useFieldSectionContainerProps.js +29 -0
- package/esm/internals/hooks/useField/useFieldSectionContentProps.d.ts +23 -0
- package/esm/internals/hooks/useField/useFieldSectionContentProps.js +226 -0
- package/esm/internals/hooks/useField/useFieldV7TextField.js +76 -307
- package/esm/internals/hooks/useMobilePicker/useMobilePicker.d.ts +1 -0
- package/esm/internals/hooks/useMobilePicker/useMobilePicker.js +9 -3
- package/esm/internals/hooks/useMobilePicker/useMobilePicker.types.d.ts +7 -0
- package/esm/internals/hooks/usePicker/usePicker.d.ts +2 -1
- package/esm/internals/hooks/usePicker/usePicker.js +14 -4
- package/esm/internals/hooks/usePicker/usePicker.types.d.ts +2 -0
- package/esm/internals/hooks/useStaticPicker/useStaticPicker.d.ts +1 -0
- package/esm/internals/hooks/useStaticPicker/useStaticPicker.js +9 -3
- package/esm/internals/hooks/useStaticPicker/useStaticPicker.types.d.ts +7 -0
- package/esm/internals/index.d.ts +7 -6
- package/esm/internals/index.js +6 -5
- package/esm/internals/utils/createNonRangePickerStepNavigation.d.ts +13 -0
- package/esm/internals/utils/createNonRangePickerStepNavigation.js +24 -0
- package/esm/internals/utils/createStepNavigation.d.ts +32 -0
- package/esm/internals/utils/createStepNavigation.js +34 -0
- package/esm/internals/utils/date-utils.d.ts +1 -0
- package/esm/internals/utils/date-utils.js +2 -2
- package/esm/internals/utils/time-utils.d.ts +2 -0
- package/esm/internals/utils/time-utils.js +4 -3
- package/esm/locales/beBY.d.ts +1 -0
- package/esm/locales/beBY.js +1 -0
- package/esm/locales/bgBG.d.ts +1 -0
- package/esm/locales/bgBG.js +1 -0
- package/esm/locales/bnBD.d.ts +1 -0
- package/esm/locales/bnBD.js +1 -0
- package/esm/locales/caES.d.ts +1 -0
- package/esm/locales/caES.js +1 -0
- package/esm/locales/csCZ.d.ts +1 -0
- package/esm/locales/csCZ.js +1 -0
- package/esm/locales/daDK.d.ts +1 -0
- package/esm/locales/daDK.js +1 -0
- package/esm/locales/deDE.d.ts +1 -0
- package/esm/locales/deDE.js +3 -3
- package/esm/locales/elGR.d.ts +1 -0
- package/esm/locales/elGR.js +1 -0
- package/esm/locales/enUS.d.ts +1 -0
- package/esm/locales/enUS.js +1 -0
- package/esm/locales/esES.d.ts +1 -0
- package/esm/locales/esES.js +1 -0
- package/esm/locales/eu.d.ts +1 -0
- package/esm/locales/eu.js +1 -0
- package/esm/locales/faIR.d.ts +1 -0
- package/esm/locales/faIR.js +1 -0
- package/esm/locales/fiFI.d.ts +1 -0
- package/esm/locales/fiFI.js +1 -0
- package/esm/locales/frFR.d.ts +1 -0
- package/esm/locales/frFR.js +1 -0
- package/esm/locales/heIL.d.ts +1 -0
- package/esm/locales/heIL.js +1 -0
- package/esm/locales/hrHR.d.ts +1 -0
- package/esm/locales/hrHR.js +1 -0
- package/esm/locales/huHU.d.ts +1 -0
- package/esm/locales/huHU.js +1 -0
- package/esm/locales/isIS.d.ts +1 -0
- package/esm/locales/isIS.js +1 -0
- package/esm/locales/itIT.d.ts +1 -0
- package/esm/locales/itIT.js +1 -0
- package/esm/locales/jaJP.d.ts +1 -0
- package/esm/locales/jaJP.js +1 -0
- package/esm/locales/koKR.d.ts +1 -0
- package/esm/locales/koKR.js +1 -0
- package/esm/locales/kzKZ.d.ts +1 -0
- package/esm/locales/kzKZ.js +1 -0
- package/esm/locales/mk.d.ts +1 -0
- package/esm/locales/mk.js +1 -0
- package/esm/locales/nbNO.d.ts +1 -0
- package/esm/locales/nbNO.js +1 -0
- package/esm/locales/nlNL.d.ts +1 -0
- package/esm/locales/nlNL.js +1 -0
- package/esm/locales/nnNO.d.ts +1 -0
- package/esm/locales/nnNO.js +1 -0
- package/esm/locales/plPL.d.ts +1 -0
- package/esm/locales/plPL.js +1 -0
- package/esm/locales/ptBR.d.ts +1 -0
- package/esm/locales/ptBR.js +1 -0
- package/esm/locales/ptPT.d.ts +1 -0
- package/esm/locales/ptPT.js +1 -0
- package/esm/locales/roRO.d.ts +1 -0
- package/esm/locales/roRO.js +1 -0
- package/esm/locales/ruRU.d.ts +1 -0
- package/esm/locales/ruRU.js +1 -0
- package/esm/locales/skSK.d.ts +1 -0
- package/esm/locales/skSK.js +1 -0
- package/esm/locales/svSE.d.ts +1 -0
- package/esm/locales/svSE.js +1 -0
- package/esm/locales/trTR.d.ts +1 -0
- package/esm/locales/trTR.js +1 -0
- package/esm/locales/ukUA.d.ts +1 -0
- package/esm/locales/ukUA.js +1 -0
- package/esm/locales/urPK.d.ts +1 -0
- package/esm/locales/urPK.js +1 -0
- package/esm/locales/utils/getPickersLocalization.d.ts +1 -0
- package/esm/locales/utils/pickersLocaleTextApi.d.ts +1 -0
- package/esm/locales/viVN.d.ts +1 -0
- package/esm/locales/viVN.js +1 -0
- package/esm/locales/zhCN.d.ts +1 -0
- package/esm/locales/zhCN.js +1 -0
- package/esm/locales/zhHK.d.ts +1 -0
- package/esm/locales/zhHK.js +1 -0
- package/esm/locales/zhTW.d.ts +1 -0
- package/esm/locales/zhTW.js +1 -0
- package/esm/managers/useDateManager.d.ts +4 -13
- package/esm/managers/useDateManager.js +18 -28
- package/esm/managers/useDateTimeManager.d.ts +4 -13
- package/esm/managers/useDateTimeManager.js +23 -33
- package/esm/managers/useTimeManager.d.ts +4 -13
- package/esm/managers/useTimeManager.js +14 -24
- package/esm/models/manager.d.ts +3 -8
- package/esm/validation/validateDate.js +3 -4
- package/index.js +1 -1
- package/internals/components/PickerProvider.d.ts +9 -0
- package/internals/hooks/useDesktopPicker/useDesktopPicker.d.ts +1 -0
- package/internals/hooks/useDesktopPicker/useDesktopPicker.js +9 -3
- package/internals/hooks/useDesktopPicker/useDesktopPicker.types.d.ts +7 -0
- package/internals/hooks/useField/buildSectionsFromFormat.js +1 -1
- package/internals/hooks/useField/syncSelectionToDOM.d.ts +9 -0
- package/internals/hooks/useField/syncSelectionToDOM.js +56 -0
- package/internals/hooks/useField/useField.types.d.ts +8 -1
- package/internals/hooks/useField/useField.utils.d.ts +1 -3
- package/internals/hooks/useField/useField.utils.js +2 -61
- package/internals/hooks/useField/useFieldHiddenInputProps.d.ts +20 -0
- package/internals/hooks/useField/useFieldHiddenInputProps.js +39 -0
- package/internals/hooks/useField/useFieldInternalPropsWithDefaults.js +8 -10
- package/internals/hooks/useField/useFieldRootHandleKeyDown.js +1 -0
- package/internals/hooks/useField/useFieldRootProps.d.ts +32 -0
- package/internals/hooks/useField/useFieldRootProps.js +156 -0
- package/internals/hooks/useField/useFieldSectionContainerProps.d.ts +15 -0
- package/internals/hooks/useField/useFieldSectionContainerProps.js +37 -0
- package/internals/hooks/useField/useFieldSectionContentProps.d.ts +23 -0
- package/internals/hooks/useField/useFieldSectionContentProps.js +234 -0
- package/internals/hooks/useField/useFieldV7TextField.js +75 -306
- package/internals/hooks/useMobilePicker/useMobilePicker.d.ts +1 -0
- package/internals/hooks/useMobilePicker/useMobilePicker.js +9 -3
- package/internals/hooks/useMobilePicker/useMobilePicker.types.d.ts +7 -0
- package/internals/hooks/usePicker/usePicker.d.ts +2 -1
- package/internals/hooks/usePicker/usePicker.js +14 -4
- package/internals/hooks/usePicker/usePicker.types.d.ts +2 -0
- package/internals/hooks/useStaticPicker/useStaticPicker.d.ts +1 -0
- package/internals/hooks/useStaticPicker/useStaticPicker.js +9 -3
- package/internals/hooks/useStaticPicker/useStaticPicker.types.d.ts +7 -0
- package/internals/index.d.ts +7 -6
- package/internals/index.js +37 -18
- package/internals/utils/createNonRangePickerStepNavigation.d.ts +13 -0
- package/internals/utils/createNonRangePickerStepNavigation.js +30 -0
- package/internals/utils/createStepNavigation.d.ts +32 -0
- package/internals/utils/createStepNavigation.js +41 -0
- package/internals/utils/date-utils.d.ts +1 -0
- package/internals/utils/date-utils.js +3 -3
- package/internals/utils/time-utils.d.ts +2 -0
- package/internals/utils/time-utils.js +5 -4
- package/locales/beBY.d.ts +1 -0
- package/locales/beBY.js +1 -0
- package/locales/bgBG.d.ts +1 -0
- package/locales/bgBG.js +1 -0
- package/locales/bnBD.d.ts +1 -0
- package/locales/bnBD.js +1 -0
- package/locales/caES.d.ts +1 -0
- package/locales/caES.js +1 -0
- package/locales/csCZ.d.ts +1 -0
- package/locales/csCZ.js +1 -0
- package/locales/daDK.d.ts +1 -0
- package/locales/daDK.js +1 -0
- package/locales/deDE.d.ts +1 -0
- package/locales/deDE.js +3 -3
- package/locales/elGR.d.ts +1 -0
- package/locales/elGR.js +1 -0
- package/locales/enUS.d.ts +1 -0
- package/locales/enUS.js +1 -0
- package/locales/esES.d.ts +1 -0
- package/locales/esES.js +1 -0
- package/locales/eu.d.ts +1 -0
- package/locales/eu.js +1 -0
- package/locales/faIR.d.ts +1 -0
- package/locales/faIR.js +1 -0
- package/locales/fiFI.d.ts +1 -0
- package/locales/fiFI.js +1 -0
- package/locales/frFR.d.ts +1 -0
- package/locales/frFR.js +1 -0
- package/locales/heIL.d.ts +1 -0
- package/locales/heIL.js +1 -0
- package/locales/hrHR.d.ts +1 -0
- package/locales/hrHR.js +1 -0
- package/locales/huHU.d.ts +1 -0
- package/locales/huHU.js +1 -0
- package/locales/isIS.d.ts +1 -0
- package/locales/isIS.js +1 -0
- package/locales/itIT.d.ts +1 -0
- package/locales/itIT.js +1 -0
- package/locales/jaJP.d.ts +1 -0
- package/locales/jaJP.js +1 -0
- package/locales/koKR.d.ts +1 -0
- package/locales/koKR.js +1 -0
- package/locales/kzKZ.d.ts +1 -0
- package/locales/kzKZ.js +1 -0
- package/locales/mk.d.ts +1 -0
- package/locales/mk.js +1 -0
- package/locales/nbNO.d.ts +1 -0
- package/locales/nbNO.js +1 -0
- package/locales/nlNL.d.ts +1 -0
- package/locales/nlNL.js +1 -0
- package/locales/nnNO.d.ts +1 -0
- package/locales/nnNO.js +1 -0
- package/locales/plPL.d.ts +1 -0
- package/locales/plPL.js +1 -0
- package/locales/ptBR.d.ts +1 -0
- package/locales/ptBR.js +1 -0
- package/locales/ptPT.d.ts +1 -0
- package/locales/ptPT.js +1 -0
- package/locales/roRO.d.ts +1 -0
- package/locales/roRO.js +1 -0
- package/locales/ruRU.d.ts +1 -0
- package/locales/ruRU.js +1 -0
- package/locales/skSK.d.ts +1 -0
- package/locales/skSK.js +1 -0
- package/locales/svSE.d.ts +1 -0
- package/locales/svSE.js +1 -0
- package/locales/trTR.d.ts +1 -0
- package/locales/trTR.js +1 -0
- package/locales/ukUA.d.ts +1 -0
- package/locales/ukUA.js +1 -0
- package/locales/urPK.d.ts +1 -0
- package/locales/urPK.js +1 -0
- package/locales/utils/getPickersLocalization.d.ts +1 -0
- package/locales/utils/pickersLocaleTextApi.d.ts +1 -0
- package/locales/viVN.d.ts +1 -0
- package/locales/viVN.js +1 -0
- package/locales/zhCN.d.ts +1 -0
- package/locales/zhCN.js +1 -0
- package/locales/zhHK.d.ts +1 -0
- package/locales/zhHK.js +1 -0
- package/locales/zhTW.d.ts +1 -0
- package/locales/zhTW.js +1 -0
- package/managers/useDateManager.d.ts +4 -13
- package/managers/useDateManager.js +18 -28
- package/managers/useDateTimeManager.d.ts +4 -13
- package/managers/useDateTimeManager.js +23 -33
- package/managers/useTimeManager.d.ts +4 -13
- package/managers/useTimeManager.js +15 -25
- package/models/manager.d.ts +3 -8
- package/modern/DateCalendar/DateCalendar.js +6 -10
- package/modern/DateCalendar/DayCalendar.js +2 -2
- package/modern/DateField/DateField.js +4 -4
- package/modern/DatePicker/shared.js +3 -9
- package/modern/DateTimeField/DateTimeField.js +4 -4
- package/modern/DateTimePicker/shared.js +4 -14
- package/modern/DesktopDatePicker/DesktopDatePicker.js +2 -1
- package/modern/DesktopDateTimePicker/DesktopDateTimePicker.js +2 -1
- package/modern/DesktopTimePicker/DesktopTimePicker.js +2 -1
- package/modern/DigitalClock/DigitalClock.js +1 -0
- package/modern/LocalizationProvider/LocalizationProvider.d.ts +1 -1
- package/modern/LocalizationProvider/LocalizationProvider.js +2 -2
- package/modern/MobileDatePicker/MobileDatePicker.js +2 -1
- package/modern/MobileDateTimePicker/MobileDateTimePicker.js +9 -1
- package/modern/MobileTimePicker/MobileTimePicker.js +2 -1
- package/modern/MonthCalendar/MonthCalendar.js +6 -11
- package/modern/MultiSectionDigitalClock/MultiSectionDigitalClockSection.js +1 -0
- package/modern/PickersActionBar/PickersActionBar.d.ts +1 -1
- package/modern/PickersActionBar/PickersActionBar.js +22 -4
- package/modern/PickersSectionList/PickersSectionList.d.ts +1 -1
- package/modern/PickersSectionList/PickersSectionList.types.d.ts +2 -6
- package/modern/StaticDatePicker/StaticDatePicker.js +2 -1
- package/modern/StaticDateTimePicker/StaticDateTimePicker.js +9 -1
- package/modern/StaticTimePicker/StaticTimePicker.js +2 -1
- package/modern/TimeField/TimeField.js +4 -4
- package/modern/TimePicker/shared.js +3 -3
- package/modern/YearCalendar/YearCalendar.js +5 -11
- package/modern/index.js +1 -1
- package/modern/internals/components/PickerProvider.d.ts +9 -0
- package/modern/internals/hooks/useDesktopPicker/useDesktopPicker.d.ts +1 -0
- package/modern/internals/hooks/useDesktopPicker/useDesktopPicker.js +9 -3
- package/modern/internals/hooks/useDesktopPicker/useDesktopPicker.types.d.ts +7 -0
- package/modern/internals/hooks/useField/buildSectionsFromFormat.js +1 -1
- package/modern/internals/hooks/useField/syncSelectionToDOM.d.ts +9 -0
- package/modern/internals/hooks/useField/syncSelectionToDOM.js +50 -0
- package/modern/internals/hooks/useField/useField.types.d.ts +8 -1
- package/modern/internals/hooks/useField/useField.utils.d.ts +1 -3
- package/modern/internals/hooks/useField/useField.utils.js +0 -57
- package/modern/internals/hooks/useField/useFieldHiddenInputProps.d.ts +20 -0
- package/modern/internals/hooks/useField/useFieldHiddenInputProps.js +31 -0
- package/modern/internals/hooks/useField/useFieldInternalPropsWithDefaults.js +8 -10
- package/modern/internals/hooks/useField/useFieldRootHandleKeyDown.js +1 -0
- package/modern/internals/hooks/useField/useFieldRootProps.d.ts +32 -0
- package/modern/internals/hooks/useField/useFieldRootProps.js +150 -0
- package/modern/internals/hooks/useField/useFieldSectionContainerProps.d.ts +15 -0
- package/modern/internals/hooks/useField/useFieldSectionContainerProps.js +29 -0
- package/modern/internals/hooks/useField/useFieldSectionContentProps.d.ts +23 -0
- package/modern/internals/hooks/useField/useFieldSectionContentProps.js +226 -0
- package/modern/internals/hooks/useField/useFieldV7TextField.js +76 -307
- package/modern/internals/hooks/useMobilePicker/useMobilePicker.d.ts +1 -0
- package/modern/internals/hooks/useMobilePicker/useMobilePicker.js +9 -3
- package/modern/internals/hooks/useMobilePicker/useMobilePicker.types.d.ts +7 -0
- package/modern/internals/hooks/usePicker/usePicker.d.ts +2 -1
- package/modern/internals/hooks/usePicker/usePicker.js +14 -4
- package/modern/internals/hooks/usePicker/usePicker.types.d.ts +2 -0
- package/modern/internals/hooks/useStaticPicker/useStaticPicker.d.ts +1 -0
- package/modern/internals/hooks/useStaticPicker/useStaticPicker.js +9 -3
- package/modern/internals/hooks/useStaticPicker/useStaticPicker.types.d.ts +7 -0
- package/modern/internals/index.d.ts +7 -6
- package/modern/internals/index.js +6 -5
- package/modern/internals/utils/createNonRangePickerStepNavigation.d.ts +13 -0
- package/modern/internals/utils/createNonRangePickerStepNavigation.js +24 -0
- package/modern/internals/utils/createStepNavigation.d.ts +32 -0
- package/modern/internals/utils/createStepNavigation.js +34 -0
- package/modern/internals/utils/date-utils.d.ts +1 -0
- package/modern/internals/utils/date-utils.js +2 -2
- package/modern/internals/utils/time-utils.d.ts +2 -0
- package/modern/internals/utils/time-utils.js +4 -3
- package/modern/locales/beBY.d.ts +1 -0
- package/modern/locales/beBY.js +1 -0
- package/modern/locales/bgBG.d.ts +1 -0
- package/modern/locales/bgBG.js +1 -0
- package/modern/locales/bnBD.d.ts +1 -0
- package/modern/locales/bnBD.js +1 -0
- package/modern/locales/caES.d.ts +1 -0
- package/modern/locales/caES.js +1 -0
- package/modern/locales/csCZ.d.ts +1 -0
- package/modern/locales/csCZ.js +1 -0
- package/modern/locales/daDK.d.ts +1 -0
- package/modern/locales/daDK.js +1 -0
- package/modern/locales/deDE.d.ts +1 -0
- package/modern/locales/deDE.js +3 -3
- package/modern/locales/elGR.d.ts +1 -0
- package/modern/locales/elGR.js +1 -0
- package/modern/locales/enUS.d.ts +1 -0
- package/modern/locales/enUS.js +1 -0
- package/modern/locales/esES.d.ts +1 -0
- package/modern/locales/esES.js +1 -0
- package/modern/locales/eu.d.ts +1 -0
- package/modern/locales/eu.js +1 -0
- package/modern/locales/faIR.d.ts +1 -0
- package/modern/locales/faIR.js +1 -0
- package/modern/locales/fiFI.d.ts +1 -0
- package/modern/locales/fiFI.js +1 -0
- package/modern/locales/frFR.d.ts +1 -0
- package/modern/locales/frFR.js +1 -0
- package/modern/locales/heIL.d.ts +1 -0
- package/modern/locales/heIL.js +1 -0
- package/modern/locales/hrHR.d.ts +1 -0
- package/modern/locales/hrHR.js +1 -0
- package/modern/locales/huHU.d.ts +1 -0
- package/modern/locales/huHU.js +1 -0
- package/modern/locales/isIS.d.ts +1 -0
- package/modern/locales/isIS.js +1 -0
- package/modern/locales/itIT.d.ts +1 -0
- package/modern/locales/itIT.js +1 -0
- package/modern/locales/jaJP.d.ts +1 -0
- package/modern/locales/jaJP.js +1 -0
- package/modern/locales/koKR.d.ts +1 -0
- package/modern/locales/koKR.js +1 -0
- package/modern/locales/kzKZ.d.ts +1 -0
- package/modern/locales/kzKZ.js +1 -0
- package/modern/locales/mk.d.ts +1 -0
- package/modern/locales/mk.js +1 -0
- package/modern/locales/nbNO.d.ts +1 -0
- package/modern/locales/nbNO.js +1 -0
- package/modern/locales/nlNL.d.ts +1 -0
- package/modern/locales/nlNL.js +1 -0
- package/modern/locales/nnNO.d.ts +1 -0
- package/modern/locales/nnNO.js +1 -0
- package/modern/locales/plPL.d.ts +1 -0
- package/modern/locales/plPL.js +1 -0
- package/modern/locales/ptBR.d.ts +1 -0
- package/modern/locales/ptBR.js +1 -0
- package/modern/locales/ptPT.d.ts +1 -0
- package/modern/locales/ptPT.js +1 -0
- package/modern/locales/roRO.d.ts +1 -0
- package/modern/locales/roRO.js +1 -0
- package/modern/locales/ruRU.d.ts +1 -0
- package/modern/locales/ruRU.js +1 -0
- package/modern/locales/skSK.d.ts +1 -0
- package/modern/locales/skSK.js +1 -0
- package/modern/locales/svSE.d.ts +1 -0
- package/modern/locales/svSE.js +1 -0
- package/modern/locales/trTR.d.ts +1 -0
- package/modern/locales/trTR.js +1 -0
- package/modern/locales/ukUA.d.ts +1 -0
- package/modern/locales/ukUA.js +1 -0
- package/modern/locales/urPK.d.ts +1 -0
- package/modern/locales/urPK.js +1 -0
- package/modern/locales/utils/getPickersLocalization.d.ts +1 -0
- package/modern/locales/utils/pickersLocaleTextApi.d.ts +1 -0
- package/modern/locales/viVN.d.ts +1 -0
- package/modern/locales/viVN.js +1 -0
- package/modern/locales/zhCN.d.ts +1 -0
- package/modern/locales/zhCN.js +1 -0
- package/modern/locales/zhHK.d.ts +1 -0
- package/modern/locales/zhHK.js +1 -0
- package/modern/locales/zhTW.d.ts +1 -0
- package/modern/locales/zhTW.js +1 -0
- package/modern/managers/useDateManager.d.ts +4 -13
- package/modern/managers/useDateManager.js +18 -28
- package/modern/managers/useDateTimeManager.d.ts +4 -13
- package/modern/managers/useDateTimeManager.js +23 -33
- package/modern/managers/useTimeManager.d.ts +4 -13
- package/modern/managers/useTimeManager.js +14 -24
- package/modern/models/manager.d.ts +3 -8
- package/modern/validation/validateDate.js +3 -4
- package/package.json +6 -6
- package/tsconfig.build.tsbuildinfo +1 -1
- package/validation/validateDate.js +3 -4
|
@@ -44,8 +44,10 @@ function PickersActionBarComponent(props) {
|
|
|
44
44
|
clearValue,
|
|
45
45
|
setValueToToday,
|
|
46
46
|
acceptValueChanges,
|
|
47
|
-
cancelValueChanges
|
|
48
|
-
|
|
47
|
+
cancelValueChanges,
|
|
48
|
+
goToNextStep,
|
|
49
|
+
hasNextStep
|
|
50
|
+
} = (0, _hooks.usePickerContext)();
|
|
49
51
|
if (actions == null || actions.length === 0) {
|
|
50
52
|
return null;
|
|
51
53
|
}
|
|
@@ -71,6 +73,22 @@ function PickersActionBarComponent(props) {
|
|
|
71
73
|
onClick: setValueToToday,
|
|
72
74
|
children: translations.todayButtonLabel
|
|
73
75
|
}, actionType);
|
|
76
|
+
case 'next':
|
|
77
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.default, {
|
|
78
|
+
onClick: goToNextStep,
|
|
79
|
+
children: translations.nextStepButtonLabel
|
|
80
|
+
}, actionType);
|
|
81
|
+
case 'nextOrAccept':
|
|
82
|
+
if (hasNextStep) {
|
|
83
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.default, {
|
|
84
|
+
onClick: goToNextStep,
|
|
85
|
+
children: translations.nextStepButtonLabel
|
|
86
|
+
}, actionType);
|
|
87
|
+
}
|
|
88
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.default, {
|
|
89
|
+
onClick: acceptValueChanges,
|
|
90
|
+
children: translations.okButtonLabel
|
|
91
|
+
}, actionType);
|
|
74
92
|
default:
|
|
75
93
|
return null;
|
|
76
94
|
}
|
|
@@ -91,7 +109,7 @@ process.env.NODE_ENV !== "production" ? PickersActionBarComponent.propTypes = {
|
|
|
91
109
|
* - `[]` for Desktop Date Picker and Desktop Date Range Picker
|
|
92
110
|
* - `['cancel', 'accept']` for all other Pickers
|
|
93
111
|
*/
|
|
94
|
-
actions: _propTypes.default.arrayOf(_propTypes.default.oneOf(['accept', 'cancel', 'clear', 'today']).isRequired),
|
|
112
|
+
actions: _propTypes.default.arrayOf(_propTypes.default.oneOf(['accept', 'cancel', 'clear', 'next', 'nextOrAccept', 'today']).isRequired),
|
|
95
113
|
/**
|
|
96
114
|
* If `true`, the actions do not have additional margin.
|
|
97
115
|
* @default false
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { PickersSectionListProps } from
|
|
2
|
+
import type { PickersSectionListProps } from './PickersSectionList.types';
|
|
3
3
|
export declare const PickersSectionListRoot: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.ClassAttributes<HTMLDivElement> | keyof React.HTMLAttributes<HTMLDivElement>>, {}>;
|
|
4
4
|
export declare const PickersSectionListSection: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, keyof React.ClassAttributes<HTMLSpanElement> | keyof React.HTMLAttributes<HTMLSpanElement>>, {}>;
|
|
5
5
|
export declare const PickersSectionListSectionSeparator: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, keyof React.ClassAttributes<HTMLSpanElement> | keyof React.HTMLAttributes<HTMLSpanElement>>, {}>;
|
|
@@ -2,6 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { SlotComponentProps } from '@mui/utils';
|
|
3
3
|
import { PickersSectionListClasses } from "./pickersSectionListClasses.js";
|
|
4
4
|
import { PickerOwnerState } from "../models/index.js";
|
|
5
|
+
import type { UseFieldDOMGetters } from '../internals/hooks/useField/useField.types';
|
|
5
6
|
export interface PickersSectionListSlots {
|
|
6
7
|
root: React.ElementType;
|
|
7
8
|
section: React.ElementType;
|
|
@@ -28,12 +29,7 @@ export interface PickersSectionElement {
|
|
|
28
29
|
before: React.HTMLAttributes<HTMLSpanElement>;
|
|
29
30
|
after: React.HTMLAttributes<HTMLSpanElement>;
|
|
30
31
|
}
|
|
31
|
-
export interface PickersSectionListRef {
|
|
32
|
-
getRoot: () => HTMLElement;
|
|
33
|
-
getSectionContainer: (sectionIndex: number) => HTMLElement;
|
|
34
|
-
getSectionContent: (sectionIndex: number) => HTMLElement;
|
|
35
|
-
getSectionIndexFromDOMElement: (element: Element | null | undefined) => number | null;
|
|
36
|
-
}
|
|
32
|
+
export interface PickersSectionListRef extends Omit<UseFieldDOMGetters, 'isReady'> {}
|
|
37
33
|
export interface ExportedPickersSectionListProps extends Pick<React.HTMLAttributes<HTMLDivElement>, 'tabIndex'> {
|
|
38
34
|
/**
|
|
39
35
|
* The elements to render.
|
|
@@ -52,7 +52,8 @@ const StaticDatePicker = exports.StaticDatePicker = /*#__PURE__*/React.forwardRe
|
|
|
52
52
|
props,
|
|
53
53
|
valueManager: _valueManagers.singleItemValueManager,
|
|
54
54
|
valueType: 'date',
|
|
55
|
-
validator: _validation.validateDate
|
|
55
|
+
validator: _validation.validateDate,
|
|
56
|
+
steps: null
|
|
56
57
|
});
|
|
57
58
|
return renderPicker();
|
|
58
59
|
});
|
|
@@ -20,6 +20,13 @@ var _utils = require("../internals/utils/utils");
|
|
|
20
20
|
var _MultiSectionDigitalClock = require("../MultiSectionDigitalClock");
|
|
21
21
|
var _dimensions = require("../internals/constants/dimensions");
|
|
22
22
|
var _DigitalClock = require("../DigitalClock");
|
|
23
|
+
var _dateUtils = require("../internals/utils/date-utils");
|
|
24
|
+
var _timeUtils = require("../internals/utils/time-utils");
|
|
25
|
+
const STEPS = [{
|
|
26
|
+
views: _dateUtils.DATE_VIEWS
|
|
27
|
+
}, {
|
|
28
|
+
views: _timeUtils.EXPORTED_TIME_VIEWS
|
|
29
|
+
}];
|
|
23
30
|
/**
|
|
24
31
|
* Demos:
|
|
25
32
|
*
|
|
@@ -94,7 +101,8 @@ const StaticDateTimePicker = exports.StaticDateTimePicker = /*#__PURE__*/React.f
|
|
|
94
101
|
props,
|
|
95
102
|
valueManager: _valueManagers.singleItemValueManager,
|
|
96
103
|
valueType: 'date-time',
|
|
97
|
-
validator: _validation.validateDateTime
|
|
104
|
+
validator: _validation.validateDateTime,
|
|
105
|
+
steps: STEPS
|
|
98
106
|
});
|
|
99
107
|
return renderPicker();
|
|
100
108
|
});
|
|
@@ -54,7 +54,8 @@ const StaticTimePicker = exports.StaticTimePicker = /*#__PURE__*/React.forwardRe
|
|
|
54
54
|
props,
|
|
55
55
|
valueManager: _valueManagers.singleItemValueManager,
|
|
56
56
|
valueType: 'time',
|
|
57
|
-
validator: _validation.validateTime
|
|
57
|
+
validator: _validation.validateTime,
|
|
58
|
+
steps: null
|
|
58
59
|
});
|
|
59
60
|
return renderPicker();
|
|
60
61
|
});
|
package/TimeField/TimeField.js
CHANGED
|
@@ -130,7 +130,7 @@ process.env.NODE_ENV !== "production" ? TimeField.propTypes = {
|
|
|
130
130
|
formatDensity: _propTypes.default.oneOf(['dense', 'spacious']),
|
|
131
131
|
/**
|
|
132
132
|
* Props applied to the [`FormHelperText`](https://mui.com/material-ui/api/form-helper-text/) element.
|
|
133
|
-
* @deprecated Use `slotProps.formHelperText` instead. This prop will be removed in
|
|
133
|
+
* @deprecated Use `slotProps.formHelperText` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
134
134
|
*/
|
|
135
135
|
FormHelperTextProps: _propTypes.default.object,
|
|
136
136
|
/**
|
|
@@ -157,12 +157,12 @@ process.env.NODE_ENV !== "production" ? TimeField.propTypes = {
|
|
|
157
157
|
/**
|
|
158
158
|
* Props applied to the [`InputLabel`](https://mui.com/material-ui/api/input-label/) element.
|
|
159
159
|
* Pointer events like `onClick` are enabled if and only if `shrink` is `true`.
|
|
160
|
-
* @deprecated Use `slotProps.inputLabel` instead. This prop will be removed in
|
|
160
|
+
* @deprecated Use `slotProps.inputLabel` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
161
161
|
*/
|
|
162
162
|
InputLabelProps: _propTypes.default.object,
|
|
163
163
|
/**
|
|
164
164
|
* [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.
|
|
165
|
-
* @deprecated Use `slotProps.htmlInput` instead. This prop will be removed in
|
|
165
|
+
* @deprecated Use `slotProps.htmlInput` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
166
166
|
*/
|
|
167
167
|
inputProps: _propTypes.default.object,
|
|
168
168
|
/**
|
|
@@ -170,7 +170,7 @@ process.env.NODE_ENV !== "production" ? TimeField.propTypes = {
|
|
|
170
170
|
* It will be a [`FilledInput`](https://mui.com/material-ui/api/filled-input/),
|
|
171
171
|
* [`OutlinedInput`](https://mui.com/material-ui/api/outlined-input/) or [`Input`](https://mui.com/material-ui/api/input/)
|
|
172
172
|
* component depending on the `variant` prop value.
|
|
173
|
-
* @deprecated Use `slotProps.input` instead. This prop will be removed in
|
|
173
|
+
* @deprecated Use `slotProps.input` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
174
174
|
*/
|
|
175
175
|
InputProps: _propTypes.default.object,
|
|
176
176
|
/**
|
package/TimePicker/shared.js
CHANGED
|
@@ -12,12 +12,14 @@ var _styles = require("@mui/material/styles");
|
|
|
12
12
|
var _useUtils = require("../internals/hooks/useUtils");
|
|
13
13
|
var _TimePickerToolbar = require("./TimePickerToolbar");
|
|
14
14
|
var _views = require("../internals/utils/views");
|
|
15
|
+
var _useTimeManager = require("../managers/useTimeManager");
|
|
15
16
|
function useTimePickerDefaultizedProps(props, name) {
|
|
16
17
|
const utils = (0, _useUtils.useUtils)();
|
|
17
18
|
const themeProps = (0, _styles.useThemeProps)({
|
|
18
19
|
props,
|
|
19
20
|
name
|
|
20
21
|
});
|
|
22
|
+
const validationProps = (0, _useTimeManager.useApplyDefaultValuesToTimeValidationProps)(themeProps);
|
|
21
23
|
const ampm = themeProps.ampm ?? utils.is12HourCycleInCurrentLocale();
|
|
22
24
|
const localeText = React.useMemo(() => {
|
|
23
25
|
if (themeProps.localeText?.toolbarTitle == null) {
|
|
@@ -27,7 +29,7 @@ function useTimePickerDefaultizedProps(props, name) {
|
|
|
27
29
|
timePickerToolbarTitle: themeProps.localeText.toolbarTitle
|
|
28
30
|
});
|
|
29
31
|
}, [themeProps.localeText]);
|
|
30
|
-
return (0, _extends2.default)({}, themeProps, {
|
|
32
|
+
return (0, _extends2.default)({}, themeProps, validationProps, {
|
|
31
33
|
ampm,
|
|
32
34
|
localeText
|
|
33
35
|
}, (0, _views.applyDefaultViewProps)({
|
|
@@ -36,8 +38,6 @@ function useTimePickerDefaultizedProps(props, name) {
|
|
|
36
38
|
defaultViews: ['hours', 'minutes'],
|
|
37
39
|
defaultOpenTo: 'hours'
|
|
38
40
|
}), {
|
|
39
|
-
disableFuture: themeProps.disableFuture ?? false,
|
|
40
|
-
disablePast: themeProps.disablePast ?? false,
|
|
41
41
|
slots: (0, _extends2.default)({
|
|
42
42
|
toolbar: _TimePickerToolbar.TimePickerToolbar
|
|
43
43
|
}, themeProps.slots),
|
|
@@ -19,12 +19,12 @@ var _utils = require("@mui/utils");
|
|
|
19
19
|
var _YearCalendarButton = require("./YearCalendarButton");
|
|
20
20
|
var _useUtils = require("../internals/hooks/useUtils");
|
|
21
21
|
var _yearCalendarClasses = require("./yearCalendarClasses");
|
|
22
|
-
var _dateUtils = require("../internals/utils/date-utils");
|
|
23
22
|
var _valueManagers = require("../internals/utils/valueManagers");
|
|
24
23
|
var _getDefaultReferenceDate = require("../internals/utils/getDefaultReferenceDate");
|
|
25
24
|
var _useControlledValue = require("../internals/hooks/useControlledValue");
|
|
26
25
|
var _dimensions = require("../internals/constants/dimensions");
|
|
27
26
|
var _usePickerPrivateContext = require("../internals/hooks/usePickerPrivateContext");
|
|
27
|
+
var _useDateManager = require("../managers/useDateManager");
|
|
28
28
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
29
29
|
const _excluded = ["autoFocus", "className", "classes", "value", "defaultValue", "referenceDate", "disabled", "disableFuture", "disablePast", "maxDate", "minDate", "onChange", "readOnly", "shouldDisableYear", "disableHighlightToday", "onYearFocus", "hasFocus", "onFocusedViewChange", "yearsOrder", "yearsPerRow", "timezone", "gridLabelId", "slots", "slotProps"];
|
|
30
30
|
const useUtilityClasses = classes => {
|
|
@@ -34,20 +34,14 @@ const useUtilityClasses = classes => {
|
|
|
34
34
|
return (0, _utils.unstable_composeClasses)(slots, _yearCalendarClasses.getYearCalendarUtilityClass, classes);
|
|
35
35
|
};
|
|
36
36
|
function useYearCalendarDefaultizedProps(props, name) {
|
|
37
|
-
const utils = (0, _useUtils.useUtils)();
|
|
38
|
-
const defaultDates = (0, _useUtils.useDefaultDates)();
|
|
39
37
|
const themeProps = (0, _styles.useThemeProps)({
|
|
40
38
|
props,
|
|
41
39
|
name
|
|
42
40
|
});
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
disableFuture: false
|
|
46
|
-
}, themeProps, {
|
|
41
|
+
const validationProps = (0, _useDateManager.useApplyDefaultValuesToDateValidationProps)(themeProps);
|
|
42
|
+
return (0, _extends2.default)({}, themeProps, validationProps, {
|
|
47
43
|
yearsPerRow: themeProps.yearsPerRow ?? 3,
|
|
48
|
-
yearsOrder: themeProps.yearsOrder ?? 'asc'
|
|
49
|
-
minDate: (0, _dateUtils.applyDefaultDate)(utils, themeProps.minDate, defaultDates.minDate),
|
|
50
|
-
maxDate: (0, _dateUtils.applyDefaultDate)(utils, themeProps.maxDate, defaultDates.maxDate)
|
|
44
|
+
yearsOrder: themeProps.yearsOrder ?? 'asc'
|
|
51
45
|
});
|
|
52
46
|
}
|
|
53
47
|
const YearCalendarRoot = (0, _styles.styled)('div', {
|
|
@@ -10,14 +10,14 @@ import useSlotProps from '@mui/utils/useSlotProps';
|
|
|
10
10
|
import { styled, useThemeProps } from '@mui/material/styles';
|
|
11
11
|
import { unstable_composeClasses as composeClasses, unstable_useId as useId, unstable_useEventCallback as useEventCallback } from '@mui/utils';
|
|
12
12
|
import { useCalendarState } from "./useCalendarState.js";
|
|
13
|
-
import {
|
|
13
|
+
import { useUtils } from "../internals/hooks/useUtils.js";
|
|
14
14
|
import { PickersFadeTransitionGroup } from "./PickersFadeTransitionGroup.js";
|
|
15
15
|
import { DayCalendar } from "./DayCalendar.js";
|
|
16
16
|
import { MonthCalendar } from "../MonthCalendar/index.js";
|
|
17
17
|
import { YearCalendar } from "../YearCalendar/index.js";
|
|
18
18
|
import { useViews } from "../internals/hooks/useViews.js";
|
|
19
19
|
import { PickersCalendarHeader } from "../PickersCalendarHeader/index.js";
|
|
20
|
-
import { findClosestEnabledDate,
|
|
20
|
+
import { findClosestEnabledDate, mergeDateAndTime } from "../internals/utils/date-utils.js";
|
|
21
21
|
import { PickerViewRoot } from "../internals/components/PickerViewRoot/index.js";
|
|
22
22
|
import { useReduceAnimations } from "../internals/hooks/useReduceAnimations.js";
|
|
23
23
|
import { getDateCalendarUtilityClass } from "./dateCalendarClasses.js";
|
|
@@ -25,6 +25,7 @@ import { useControlledValue } from "../internals/hooks/useControlledValue.js";
|
|
|
25
25
|
import { singleItemValueManager } from "../internals/utils/valueManagers.js";
|
|
26
26
|
import { VIEW_HEIGHT } from "../internals/constants/dimensions.js";
|
|
27
27
|
import { usePickerPrivateContext } from "../internals/hooks/usePickerPrivateContext.js";
|
|
28
|
+
import { useApplyDefaultValuesToDateValidationProps } from "../managers/useDateManager.js";
|
|
28
29
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
29
30
|
const useUtilityClasses = classes => {
|
|
30
31
|
const slots = {
|
|
@@ -34,25 +35,20 @@ const useUtilityClasses = classes => {
|
|
|
34
35
|
return composeClasses(slots, getDateCalendarUtilityClass, classes);
|
|
35
36
|
};
|
|
36
37
|
function useDateCalendarDefaultizedProps(props, name) {
|
|
37
|
-
const utils = useUtils();
|
|
38
|
-
const defaultDates = useDefaultDates();
|
|
39
38
|
const themeProps = useThemeProps({
|
|
40
39
|
props,
|
|
41
40
|
name
|
|
42
41
|
});
|
|
43
42
|
const reduceAnimations = useReduceAnimations(themeProps.reduceAnimations);
|
|
44
|
-
|
|
43
|
+
const validationProps = useApplyDefaultValuesToDateValidationProps(themeProps);
|
|
44
|
+
return _extends({}, themeProps, validationProps, {
|
|
45
45
|
loading: themeProps.loading ?? false,
|
|
46
|
-
disablePast: themeProps.disablePast ?? false,
|
|
47
|
-
disableFuture: themeProps.disableFuture ?? false,
|
|
48
46
|
openTo: themeProps.openTo ?? 'day',
|
|
49
47
|
views: themeProps.views ?? ['year', 'day'],
|
|
50
48
|
reduceAnimations,
|
|
51
49
|
renderLoading: themeProps.renderLoading ?? (() => /*#__PURE__*/_jsx("span", {
|
|
52
50
|
children: "..."
|
|
53
|
-
}))
|
|
54
|
-
minDate: applyDefaultDate(utils, themeProps.minDate, defaultDates.minDate),
|
|
55
|
-
maxDate: applyDefaultDate(utils, themeProps.maxDate, defaultDates.maxDate)
|
|
51
|
+
}))
|
|
56
52
|
});
|
|
57
53
|
}
|
|
58
54
|
const DateCalendarRoot = styled(PickerViewRoot, {
|
|
@@ -81,7 +81,7 @@ const PickersCalendarWeekNumberLabel = styled(Typography, {
|
|
|
81
81
|
display: 'flex',
|
|
82
82
|
justifyContent: 'center',
|
|
83
83
|
alignItems: 'center',
|
|
84
|
-
color: theme.palette.text.disabled
|
|
84
|
+
color: (theme.vars || theme).palette.text.disabled
|
|
85
85
|
}));
|
|
86
86
|
const PickersCalendarWeekNumber = styled(Typography, {
|
|
87
87
|
name: 'MuiDayCalendar',
|
|
@@ -94,7 +94,7 @@ const PickersCalendarWeekNumber = styled(Typography, {
|
|
|
94
94
|
height: DAY_SIZE,
|
|
95
95
|
padding: 0,
|
|
96
96
|
margin: `0 ${DAY_MARGIN}px`,
|
|
97
|
-
color: theme.palette.text.disabled,
|
|
97
|
+
color: (theme.vars || theme).palette.text.disabled,
|
|
98
98
|
fontSize: '0.75rem',
|
|
99
99
|
alignItems: 'center',
|
|
100
100
|
justifyContent: 'center',
|
|
@@ -113,7 +113,7 @@ process.env.NODE_ENV !== "production" ? DateField.propTypes = {
|
|
|
113
113
|
formatDensity: PropTypes.oneOf(['dense', 'spacious']),
|
|
114
114
|
/**
|
|
115
115
|
* Props applied to the [`FormHelperText`](https://mui.com/material-ui/api/form-helper-text/) element.
|
|
116
|
-
* @deprecated Use `slotProps.formHelperText` instead. This prop will be removed in
|
|
116
|
+
* @deprecated Use `slotProps.formHelperText` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
117
117
|
*/
|
|
118
118
|
FormHelperTextProps: PropTypes.object,
|
|
119
119
|
/**
|
|
@@ -140,12 +140,12 @@ process.env.NODE_ENV !== "production" ? DateField.propTypes = {
|
|
|
140
140
|
/**
|
|
141
141
|
* Props applied to the [`InputLabel`](https://mui.com/material-ui/api/input-label/) element.
|
|
142
142
|
* Pointer events like `onClick` are enabled if and only if `shrink` is `true`.
|
|
143
|
-
* @deprecated Use `slotProps.inputLabel` instead. This prop will be removed in
|
|
143
|
+
* @deprecated Use `slotProps.inputLabel` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
144
144
|
*/
|
|
145
145
|
InputLabelProps: PropTypes.object,
|
|
146
146
|
/**
|
|
147
147
|
* [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.
|
|
148
|
-
* @deprecated Use `slotProps.htmlInput` instead. This prop will be removed in
|
|
148
|
+
* @deprecated Use `slotProps.htmlInput` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
149
149
|
*/
|
|
150
150
|
inputProps: PropTypes.object,
|
|
151
151
|
/**
|
|
@@ -153,7 +153,7 @@ process.env.NODE_ENV !== "production" ? DateField.propTypes = {
|
|
|
153
153
|
* It will be a [`FilledInput`](https://mui.com/material-ui/api/filled-input/),
|
|
154
154
|
* [`OutlinedInput`](https://mui.com/material-ui/api/outlined-input/) or [`Input`](https://mui.com/material-ui/api/input/)
|
|
155
155
|
* component depending on the `variant` prop value.
|
|
156
|
-
* @deprecated Use `slotProps.input` instead. This prop will be removed in
|
|
156
|
+
* @deprecated Use `slotProps.input` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
157
157
|
*/
|
|
158
158
|
InputProps: PropTypes.object,
|
|
159
159
|
/**
|
package/esm/DatePicker/shared.js
CHANGED
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { useThemeProps } from '@mui/material/styles';
|
|
4
|
-
import { useDefaultDates, useUtils } from "../internals/hooks/useUtils.js";
|
|
5
4
|
import { applyDefaultViewProps } from "../internals/utils/views.js";
|
|
6
|
-
import { applyDefaultDate } from "../internals/utils/date-utils.js";
|
|
7
5
|
import { DatePickerToolbar } from "./DatePickerToolbar.js";
|
|
6
|
+
import { useApplyDefaultValuesToDateValidationProps } from "../managers/useDateManager.js";
|
|
8
7
|
export function useDatePickerDefaultizedProps(props, name) {
|
|
9
|
-
const utils = useUtils();
|
|
10
|
-
const defaultDates = useDefaultDates();
|
|
11
8
|
const themeProps = useThemeProps({
|
|
12
9
|
props,
|
|
13
10
|
name
|
|
14
11
|
});
|
|
12
|
+
const validationProps = useApplyDefaultValuesToDateValidationProps(themeProps);
|
|
15
13
|
const localeText = React.useMemo(() => {
|
|
16
14
|
if (themeProps.localeText?.toolbarTitle == null) {
|
|
17
15
|
return themeProps.localeText;
|
|
@@ -20,7 +18,7 @@ export function useDatePickerDefaultizedProps(props, name) {
|
|
|
20
18
|
datePickerToolbarTitle: themeProps.localeText.toolbarTitle
|
|
21
19
|
});
|
|
22
20
|
}, [themeProps.localeText]);
|
|
23
|
-
return _extends({}, themeProps, {
|
|
21
|
+
return _extends({}, themeProps, validationProps, {
|
|
24
22
|
localeText
|
|
25
23
|
}, applyDefaultViewProps({
|
|
26
24
|
views: themeProps.views,
|
|
@@ -28,10 +26,6 @@ export function useDatePickerDefaultizedProps(props, name) {
|
|
|
28
26
|
defaultViews: ['year', 'day'],
|
|
29
27
|
defaultOpenTo: 'day'
|
|
30
28
|
}), {
|
|
31
|
-
disableFuture: themeProps.disableFuture ?? false,
|
|
32
|
-
disablePast: themeProps.disablePast ?? false,
|
|
33
|
-
minDate: applyDefaultDate(utils, themeProps.minDate, defaultDates.minDate),
|
|
34
|
-
maxDate: applyDefaultDate(utils, themeProps.maxDate, defaultDates.maxDate),
|
|
35
29
|
slots: _extends({
|
|
36
30
|
toolbar: DatePickerToolbar
|
|
37
31
|
}, themeProps.slots)
|
|
@@ -123,7 +123,7 @@ process.env.NODE_ENV !== "production" ? DateTimeField.propTypes = {
|
|
|
123
123
|
formatDensity: PropTypes.oneOf(['dense', 'spacious']),
|
|
124
124
|
/**
|
|
125
125
|
* Props applied to the [`FormHelperText`](https://mui.com/material-ui/api/form-helper-text/) element.
|
|
126
|
-
* @deprecated Use `slotProps.formHelperText` instead. This prop will be removed in
|
|
126
|
+
* @deprecated Use `slotProps.formHelperText` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
127
127
|
*/
|
|
128
128
|
FormHelperTextProps: PropTypes.object,
|
|
129
129
|
/**
|
|
@@ -150,12 +150,12 @@ process.env.NODE_ENV !== "production" ? DateTimeField.propTypes = {
|
|
|
150
150
|
/**
|
|
151
151
|
* Props applied to the [`InputLabel`](https://mui.com/material-ui/api/input-label/) element.
|
|
152
152
|
* Pointer events like `onClick` are enabled if and only if `shrink` is `true`.
|
|
153
|
-
* @deprecated Use `slotProps.inputLabel` instead. This prop will be removed in
|
|
153
|
+
* @deprecated Use `slotProps.inputLabel` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
154
154
|
*/
|
|
155
155
|
InputLabelProps: PropTypes.object,
|
|
156
156
|
/**
|
|
157
157
|
* [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.
|
|
158
|
-
* @deprecated Use `slotProps.htmlInput` instead. This prop will be removed in
|
|
158
|
+
* @deprecated Use `slotProps.htmlInput` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
159
159
|
*/
|
|
160
160
|
inputProps: PropTypes.object,
|
|
161
161
|
/**
|
|
@@ -163,7 +163,7 @@ process.env.NODE_ENV !== "production" ? DateTimeField.propTypes = {
|
|
|
163
163
|
* It will be a [`FilledInput`](https://mui.com/material-ui/api/filled-input/),
|
|
164
164
|
* [`OutlinedInput`](https://mui.com/material-ui/api/outlined-input/) or [`Input`](https://mui.com/material-ui/api/input/)
|
|
165
165
|
* component depending on the `variant` prop value.
|
|
166
|
-
* @deprecated Use `slotProps.input` instead. This prop will be removed in
|
|
166
|
+
* @deprecated Use `slotProps.input` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
167
167
|
*/
|
|
168
168
|
InputProps: PropTypes.object,
|
|
169
169
|
/**
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { useThemeProps } from '@mui/material/styles';
|
|
4
|
-
import {
|
|
5
|
-
import { applyDefaultDate } from "../internals/utils/date-utils.js";
|
|
4
|
+
import { useUtils } from "../internals/hooks/useUtils.js";
|
|
6
5
|
import { DateTimePickerTabs } from "./DateTimePickerTabs.js";
|
|
7
6
|
import { DateTimePickerToolbar } from "./DateTimePickerToolbar.js";
|
|
8
7
|
import { applyDefaultViewProps } from "../internals/utils/views.js";
|
|
9
8
|
import { resolveTimeViewsResponse } from "../internals/utils/date-time-utils.js";
|
|
9
|
+
import { useApplyDefaultValuesToDateTimeValidationProps } from "../managers/useDateTimeManager.js";
|
|
10
10
|
export function useDateTimePickerDefaultizedProps(props, name) {
|
|
11
11
|
const utils = useUtils();
|
|
12
|
-
const defaultDates = useDefaultDates();
|
|
13
12
|
const themeProps = useThemeProps({
|
|
14
13
|
props,
|
|
15
14
|
name
|
|
16
15
|
});
|
|
16
|
+
const validationProps = useApplyDefaultValuesToDateTimeValidationProps(themeProps);
|
|
17
17
|
const ampm = themeProps.ampm ?? utils.is12HourCycleInCurrentLocale();
|
|
18
18
|
const localeText = React.useMemo(() => {
|
|
19
19
|
if (themeProps.localeText?.toolbarTitle == null) {
|
|
@@ -43,7 +43,7 @@ export function useDateTimePickerDefaultizedProps(props, name) {
|
|
|
43
43
|
timeSteps: themeProps.timeSteps,
|
|
44
44
|
views: defaultViews
|
|
45
45
|
});
|
|
46
|
-
return _extends({}, themeProps, {
|
|
46
|
+
return _extends({}, themeProps, validationProps, {
|
|
47
47
|
timeSteps,
|
|
48
48
|
openTo,
|
|
49
49
|
shouldRenderTimeInASingleColumn,
|
|
@@ -52,16 +52,6 @@ export function useDateTimePickerDefaultizedProps(props, name) {
|
|
|
52
52
|
ampm,
|
|
53
53
|
localeText,
|
|
54
54
|
orientation: themeProps.orientation ?? 'portrait',
|
|
55
|
-
// TODO: Remove from public API
|
|
56
|
-
disableIgnoringDatePartForTimeValidation: themeProps.disableIgnoringDatePartForTimeValidation ?? Boolean(themeProps.minDateTime || themeProps.maxDateTime ||
|
|
57
|
-
// allow time clock to correctly check time validity: https://github.com/mui/mui-x/issues/8520
|
|
58
|
-
themeProps.disablePast || themeProps.disableFuture),
|
|
59
|
-
disableFuture: themeProps.disableFuture ?? false,
|
|
60
|
-
disablePast: themeProps.disablePast ?? false,
|
|
61
|
-
minDate: applyDefaultDate(utils, themeProps.minDateTime ?? themeProps.minDate, defaultDates.minDate),
|
|
62
|
-
maxDate: applyDefaultDate(utils, themeProps.maxDateTime ?? themeProps.maxDate, defaultDates.maxDate),
|
|
63
|
-
minTime: themeProps.minDateTime ?? themeProps.minTime,
|
|
64
|
-
maxTime: themeProps.maxDateTime ?? themeProps.maxTime,
|
|
65
55
|
slots: _extends({
|
|
66
56
|
toolbar: DateTimePickerToolbar,
|
|
67
57
|
tabs: DateTimePickerTabs
|
|
@@ -62,7 +62,8 @@ const DesktopDatePicker = /*#__PURE__*/React.forwardRef(function DesktopDatePick
|
|
|
62
62
|
props,
|
|
63
63
|
valueManager: singleItemValueManager,
|
|
64
64
|
valueType: 'date',
|
|
65
|
-
validator: validateDate
|
|
65
|
+
validator: validateDate,
|
|
66
|
+
steps: null
|
|
66
67
|
});
|
|
67
68
|
return renderPicker();
|
|
68
69
|
});
|
|
@@ -136,7 +136,8 @@ const DesktopDateTimePicker = /*#__PURE__*/React.forwardRef(function DesktopDate
|
|
|
136
136
|
valueManager: singleItemValueManager,
|
|
137
137
|
valueType: 'date-time',
|
|
138
138
|
validator: validateDateTime,
|
|
139
|
-
rendererInterceptor
|
|
139
|
+
rendererInterceptor,
|
|
140
|
+
steps: null
|
|
140
141
|
});
|
|
141
142
|
return renderPicker();
|
|
142
143
|
});
|
|
@@ -73,7 +73,8 @@ const DesktopTimePicker = /*#__PURE__*/React.forwardRef(function DesktopTimePick
|
|
|
73
73
|
props,
|
|
74
74
|
valueManager: singleItemValueManager,
|
|
75
75
|
valueType: 'time',
|
|
76
|
-
validator: validateTime
|
|
76
|
+
validator: validateTime,
|
|
77
|
+
steps: null
|
|
77
78
|
});
|
|
78
79
|
return renderPicker();
|
|
79
80
|
});
|
|
@@ -15,7 +15,7 @@ export interface LocalizationProviderProps<TLocale> {
|
|
|
15
15
|
children?: React.ReactNode;
|
|
16
16
|
/**
|
|
17
17
|
* Date library adapter class function.
|
|
18
|
-
* @see See the localization provider {@link https://mui.com/x/react-date-pickers/
|
|
18
|
+
* @see See the localization provider {@link https://next.mui.com/x/react-date-pickers/quickstart/#integrate-provider-and-adapter date adapter setup section} for more details.
|
|
19
19
|
*/
|
|
20
20
|
dateAdapter?: new (...args: any) => MuiPickersAdapter<TLocale>;
|
|
21
21
|
/** Formats that are used for any child pickers */
|
|
@@ -63,7 +63,7 @@ export const LocalizationProvider = function LocalizationProvider(inProps) {
|
|
|
63
63
|
instance: dateLibInstance
|
|
64
64
|
});
|
|
65
65
|
if (!adapter.isMUIAdapter) {
|
|
66
|
-
throw new Error(['MUI X: The date adapter should be imported from `@mui/x-date-pickers` or `@mui/x-date-pickers-pro`, not from `@date-io`', "For example, `import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'` instead of `import AdapterDayjs from '@date-io/dayjs'`", 'More information on the installation documentation: https://mui.com/x/react-date-pickers/
|
|
66
|
+
throw new Error(['MUI X: The date adapter should be imported from `@mui/x-date-pickers` or `@mui/x-date-pickers-pro`, not from `@date-io`', "For example, `import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'` instead of `import AdapterDayjs from '@date-io/dayjs'`", 'More information on the installation documentation: https://mui.com/x/react-date-pickers/quickstart/#installation'].join(`\n`));
|
|
67
67
|
}
|
|
68
68
|
return adapter;
|
|
69
69
|
}, [DateAdapter, adapterLocale, dateFormats, dateLibInstance, parentUtils]);
|
|
@@ -100,7 +100,7 @@ process.env.NODE_ENV !== "production" ? LocalizationProvider.propTypes = {
|
|
|
100
100
|
children: PropTypes.node,
|
|
101
101
|
/**
|
|
102
102
|
* Date library adapter class function.
|
|
103
|
-
* @see See the localization provider {@link https://mui.com/x/react-date-pickers/
|
|
103
|
+
* @see See the localization provider {@link https://next.mui.com/x/react-date-pickers/quickstart/#integrate-provider-and-adapter date adapter setup section} for more details.
|
|
104
104
|
*/
|
|
105
105
|
dateAdapter: PropTypes.func,
|
|
106
106
|
/**
|
|
@@ -55,7 +55,8 @@ const MobileDatePicker = /*#__PURE__*/React.forwardRef(function MobileDatePicker
|
|
|
55
55
|
props,
|
|
56
56
|
valueManager: singleItemValueManager,
|
|
57
57
|
valueType: 'date',
|
|
58
|
-
validator: validateDate
|
|
58
|
+
validator: validateDate,
|
|
59
|
+
steps: null
|
|
59
60
|
});
|
|
60
61
|
return renderPicker();
|
|
61
62
|
});
|
|
@@ -18,6 +18,13 @@ import { DIALOG_WIDTH, VIEW_HEIGHT } from "../internals/constants/dimensions.js"
|
|
|
18
18
|
import { multiSectionDigitalClockClasses, multiSectionDigitalClockSectionClasses } from "../MultiSectionDigitalClock/index.js";
|
|
19
19
|
import { mergeSx } from "../internals/utils/utils.js";
|
|
20
20
|
import { digitalClockClasses } from "../DigitalClock/index.js";
|
|
21
|
+
import { EXPORTED_TIME_VIEWS } from "../internals/utils/time-utils.js";
|
|
22
|
+
import { DATE_VIEWS } from "../internals/utils/date-utils.js";
|
|
23
|
+
const STEPS = [{
|
|
24
|
+
views: DATE_VIEWS
|
|
25
|
+
}, {
|
|
26
|
+
views: EXPORTED_TIME_VIEWS
|
|
27
|
+
}];
|
|
21
28
|
/**
|
|
22
29
|
* Demos:
|
|
23
30
|
*
|
|
@@ -98,7 +105,8 @@ const MobileDateTimePicker = /*#__PURE__*/React.forwardRef(function MobileDateTi
|
|
|
98
105
|
props,
|
|
99
106
|
valueManager: singleItemValueManager,
|
|
100
107
|
valueType: 'date-time',
|
|
101
|
-
validator: validateDateTime
|
|
108
|
+
validator: validateDateTime,
|
|
109
|
+
steps: STEPS
|
|
102
110
|
});
|
|
103
111
|
return renderPicker();
|
|
104
112
|
});
|
|
@@ -58,7 +58,8 @@ const MobileTimePicker = /*#__PURE__*/React.forwardRef(function MobileTimePicker
|
|
|
58
58
|
props,
|
|
59
59
|
valueManager: singleItemValueManager,
|
|
60
60
|
valueType: 'time',
|
|
61
|
-
validator: validateTime
|
|
61
|
+
validator: validateTime,
|
|
62
|
+
steps: null
|
|
62
63
|
});
|
|
63
64
|
return renderPicker();
|
|
64
65
|
});
|
|
@@ -11,14 +11,15 @@ import { shouldForwardProp } from '@mui/system/createStyled';
|
|
|
11
11
|
import { styled, useThemeProps } from '@mui/material/styles';
|
|
12
12
|
import { unstable_useControlled as useControlled, unstable_composeClasses as composeClasses, unstable_useEventCallback as useEventCallback } from '@mui/utils';
|
|
13
13
|
import { MonthCalendarButton } from "./MonthCalendarButton.js";
|
|
14
|
-
import { useUtils, useNow
|
|
14
|
+
import { useUtils, useNow } from "../internals/hooks/useUtils.js";
|
|
15
15
|
import { getMonthCalendarUtilityClass } from "./monthCalendarClasses.js";
|
|
16
|
-
import {
|
|
16
|
+
import { getMonthsInYear } from "../internals/utils/date-utils.js";
|
|
17
17
|
import { singleItemValueManager } from "../internals/utils/valueManagers.js";
|
|
18
18
|
import { SECTION_TYPE_GRANULARITY } from "../internals/utils/getDefaultReferenceDate.js";
|
|
19
19
|
import { useControlledValue } from "../internals/hooks/useControlledValue.js";
|
|
20
20
|
import { DIALOG_WIDTH } from "../internals/constants/dimensions.js";
|
|
21
21
|
import { usePickerPrivateContext } from "../internals/hooks/usePickerPrivateContext.js";
|
|
22
|
+
import { useApplyDefaultValuesToDateValidationProps } from "../managers/useDateManager.js";
|
|
22
23
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
23
24
|
const useUtilityClasses = classes => {
|
|
24
25
|
const slots = {
|
|
@@ -27,19 +28,13 @@ const useUtilityClasses = classes => {
|
|
|
27
28
|
return composeClasses(slots, getMonthCalendarUtilityClass, classes);
|
|
28
29
|
};
|
|
29
30
|
export function useMonthCalendarDefaultizedProps(props, name) {
|
|
30
|
-
const utils = useUtils();
|
|
31
|
-
const defaultDates = useDefaultDates();
|
|
32
31
|
const themeProps = useThemeProps({
|
|
33
32
|
props,
|
|
34
33
|
name
|
|
35
34
|
});
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}, themeProps, {
|
|
40
|
-
monthsPerRow: themeProps.monthsPerRow ?? 3,
|
|
41
|
-
minDate: applyDefaultDate(utils, themeProps.minDate, defaultDates.minDate),
|
|
42
|
-
maxDate: applyDefaultDate(utils, themeProps.maxDate, defaultDates.maxDate)
|
|
35
|
+
const validationProps = useApplyDefaultValuesToDateValidationProps(themeProps);
|
|
36
|
+
return _extends({}, themeProps, validationProps, {
|
|
37
|
+
monthsPerRow: themeProps.monthsPerRow ?? 3
|
|
43
38
|
});
|
|
44
39
|
}
|
|
45
40
|
const MonthCalendarRoot = styled('div', {
|