@mui/x-date-pickers 7.22.1 → 8.0.0-alpha.0
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/AdapterDateFns/AdapterDateFns.d.ts +1 -1
- package/AdapterDateFnsBase/AdapterDateFnsBase.d.ts +3 -3
- package/AdapterDateFnsJalali/AdapterDateFnsJalali.d.ts +1 -1
- package/AdapterDateFnsJalaliV3/AdapterDateFnsJalaliV3.d.ts +1 -1
- package/AdapterDateFnsV3/AdapterDateFnsV3.d.ts +1 -1
- package/AdapterDayjs/AdapterDayjs.d.ts +2 -2
- package/AdapterLuxon/AdapterLuxon.d.ts +2 -2
- package/AdapterMoment/AdapterMoment.d.ts +2 -2
- package/AdapterMomentHijri/AdapterMomentHijri.d.ts +2 -2
- package/AdapterMomentJalaali/AdapterMomentJalaali.d.ts +2 -2
- package/CHANGELOG.md +143 -92
- package/DateCalendar/DateCalendar.d.ts +1 -2
- package/DateCalendar/DateCalendar.js +20 -22
- package/DateCalendar/DateCalendar.types.d.ts +21 -31
- package/DateCalendar/DayCalendar.d.ts +25 -24
- package/DateCalendar/DayCalendar.js +13 -10
- package/DateCalendar/index.d.ts +1 -0
- package/DateCalendar/useCalendarState.d.ts +16 -16
- package/DateCalendar/useIsDateDisabled.d.ts +2 -2
- package/DateField/DateField.d.ts +1 -2
- package/DateField/DateField.js +8 -10
- package/DateField/DateField.types.d.ts +8 -9
- package/DateField/index.d.ts +1 -1
- package/DateField/useDateField.d.ts +1 -2
- package/DatePicker/DatePicker.d.ts +1 -2
- package/DatePicker/DatePicker.js +15 -14
- package/DatePicker/DatePicker.types.d.ts +10 -11
- package/DatePicker/DatePickerToolbar.d.ts +2 -2
- package/DatePicker/DatePickerToolbar.js +12 -2
- package/DatePicker/shared.d.ts +11 -11
- package/DateTimeField/DateTimeField.d.ts +1 -2
- package/DateTimeField/DateTimeField.js +9 -12
- package/DateTimeField/DateTimeField.types.d.ts +9 -14
- package/DateTimeField/index.d.ts +1 -1
- package/DateTimeField/useDateTimeField.d.ts +1 -2
- package/DateTimePicker/DateTimePicker.d.ts +1 -2
- package/DateTimePicker/DateTimePicker.js +16 -16
- package/DateTimePicker/DateTimePicker.types.d.ts +10 -13
- package/DateTimePicker/DateTimePickerTabs.d.ts +1 -2
- package/DateTimePicker/DateTimePickerTabs.js +2 -2
- package/DateTimePicker/DateTimePickerToolbar.d.ts +3 -3
- package/DateTimePicker/DateTimePickerToolbar.js +12 -2
- package/DateTimePicker/shared.d.ts +12 -12
- package/DesktopDatePicker/DesktopDatePicker.d.ts +1 -2
- package/DesktopDatePicker/DesktopDatePicker.js +17 -16
- package/DesktopDatePicker/DesktopDatePicker.types.d.ts +7 -7
- package/DesktopDateTimePicker/DesktopDateTimePicker.d.ts +1 -2
- package/DesktopDateTimePicker/DesktopDateTimePicker.js +18 -18
- package/DesktopDateTimePicker/DesktopDateTimePicker.types.d.ts +8 -8
- package/DesktopDateTimePicker/DesktopDateTimePickerLayout.d.ts +1 -2
- package/DesktopDateTimePicker/DesktopDateTimePickerLayout.js +10 -0
- package/DesktopTimePicker/DesktopTimePicker.d.ts +1 -2
- package/DesktopTimePicker/DesktopTimePicker.js +11 -6
- package/DesktopTimePicker/DesktopTimePicker.types.d.ts +8 -8
- package/DigitalClock/DigitalClock.d.ts +1 -2
- package/DigitalClock/DigitalClock.js +7 -6
- package/DigitalClock/DigitalClock.types.d.ts +4 -4
- package/LocalizationProvider/LocalizationProvider.d.ts +12 -12
- package/MobileDatePicker/MobileDatePicker.d.ts +1 -2
- package/MobileDatePicker/MobileDatePicker.js +17 -16
- package/MobileDatePicker/MobileDatePicker.types.d.ts +7 -7
- package/MobileDateTimePicker/MobileDateTimePicker.d.ts +2 -2
- package/MobileDateTimePicker/MobileDateTimePicker.js +18 -18
- package/MobileDateTimePicker/MobileDateTimePicker.types.d.ts +7 -7
- package/MobileTimePicker/MobileTimePicker.d.ts +2 -2
- package/MobileTimePicker/MobileTimePicker.js +11 -6
- package/MobileTimePicker/MobileTimePicker.types.d.ts +7 -7
- package/MonthCalendar/MonthCalendar.d.ts +3 -4
- package/MonthCalendar/MonthCalendar.js +17 -14
- package/MonthCalendar/MonthCalendar.types.d.ts +14 -15
- package/MonthCalendar/PickersMonth.js +17 -13
- package/MultiSectionDigitalClock/MultiSectionDigitalClock.d.ts +1 -2
- package/MultiSectionDigitalClock/MultiSectionDigitalClock.js +7 -6
- package/MultiSectionDigitalClock/MultiSectionDigitalClock.types.d.ts +3 -4
- package/MultiSectionDigitalClock/MultiSectionDigitalClock.utils.d.ts +9 -9
- package/MultiSectionDigitalClock/MultiSectionDigitalClockSection.d.ts +2 -3
- package/PickersActionBar/PickersActionBar.js +2 -2
- package/PickersCalendarHeader/PickersCalendarHeader.d.ts +1 -2
- package/PickersCalendarHeader/PickersCalendarHeader.js +2 -2
- package/PickersCalendarHeader/PickersCalendarHeader.types.d.ts +9 -9
- package/PickersDay/PickersDay.d.ts +8 -8
- package/PickersLayout/PickersLayout.d.ts +2 -3
- package/PickersLayout/PickersLayout.js +10 -0
- package/PickersLayout/PickersLayout.types.d.ts +14 -17
- package/PickersLayout/index.d.ts +1 -1
- package/PickersLayout/usePickerLayout.d.ts +1 -2
- package/PickersLayout/usePickerLayout.js +17 -18
- package/README.md +2 -2
- package/StaticDatePicker/StaticDatePicker.d.ts +1 -2
- package/StaticDatePicker/StaticDatePicker.js +14 -13
- package/StaticDatePicker/StaticDatePicker.types.d.ts +7 -7
- package/StaticDateTimePicker/StaticDateTimePicker.d.ts +1 -2
- package/StaticDateTimePicker/StaticDateTimePicker.js +15 -15
- package/StaticDateTimePicker/StaticDateTimePicker.types.d.ts +7 -7
- package/StaticTimePicker/StaticTimePicker.d.ts +1 -2
- package/StaticTimePicker/StaticTimePicker.js +8 -3
- package/StaticTimePicker/StaticTimePicker.types.d.ts +7 -7
- package/TimeClock/Clock.d.ts +4 -5
- package/TimeClock/Clock.js +3 -3
- package/TimeClock/ClockNumbers.d.ts +5 -5
- package/TimeClock/TimeClock.d.ts +1 -2
- package/TimeClock/TimeClock.js +7 -6
- package/TimeClock/TimeClock.types.d.ts +4 -4
- package/TimeField/TimeField.d.ts +1 -2
- package/TimeField/TimeField.js +6 -6
- package/TimeField/TimeField.types.d.ts +9 -14
- package/TimeField/index.d.ts +1 -1
- package/TimeField/useTimeField.d.ts +1 -2
- package/TimePicker/TimePicker.d.ts +1 -2
- package/TimePicker/TimePicker.js +9 -4
- package/TimePicker/TimePicker.types.d.ts +10 -13
- package/TimePicker/TimePickerToolbar.d.ts +2 -2
- package/TimePicker/TimePickerToolbar.js +12 -2
- package/TimePicker/shared.d.ts +10 -10
- package/YearCalendar/PickersYear.js +17 -13
- package/YearCalendar/YearCalendar.d.ts +1 -2
- package/YearCalendar/YearCalendar.js +17 -14
- package/YearCalendar/YearCalendar.types.d.ts +14 -15
- package/dateViewRenderers/dateViewRenderers.d.ts +3 -3
- package/hooks/index.d.ts +2 -2
- package/hooks/index.js +2 -2
- package/hooks/useClearableField.js +4 -3
- package/hooks/useParsedFormat.d.ts +2 -3
- package/hooks/useParsedFormat.js +2 -2
- package/hooks/usePickerContext.d.ts +4 -0
- package/hooks/usePickerContext.js +15 -0
- package/hooks/usePickerTranslations.d.ts +1 -0
- package/{modern/hooks/usePickersTranslations.js → hooks/usePickerTranslations.js} +1 -1
- package/index.js +1 -1
- package/internals/components/{PickersProvider.d.ts → PickerProvider.d.ts} +15 -8
- package/internals/components/PickerProvider.js +38 -0
- package/internals/hooks/date-helpers-hooks.d.ts +6 -6
- package/internals/hooks/defaultizedFieldProps.d.ts +7 -8
- package/internals/hooks/useClockReferenceDate.d.ts +5 -5
- package/internals/hooks/useDesktopPicker/useDesktopPicker.d.ts +1 -2
- package/internals/hooks/useDesktopPicker/useDesktopPicker.js +21 -17
- package/internals/hooks/useDesktopPicker/useDesktopPicker.types.d.ts +15 -15
- package/internals/hooks/useField/buildSectionsFromFormat.d.ts +5 -5
- package/internals/hooks/useField/useField.d.ts +3 -3
- package/internals/hooks/useField/useField.js +1 -1
- package/internals/hooks/useField/useField.types.d.ts +38 -48
- package/internals/hooks/useField/useField.utils.d.ts +13 -13
- package/internals/hooks/useField/useField.utils.js +2 -1
- package/internals/hooks/useField/useFieldCharacterEditing.d.ts +4 -4
- package/internals/hooks/useField/useFieldState.d.ts +4 -4
- package/internals/hooks/useField/useFieldState.js +3 -3
- package/internals/hooks/useField/useFieldV7TextField.js +2 -2
- package/internals/hooks/useMobilePicker/useMobilePicker.d.ts +1 -2
- package/internals/hooks/useMobilePicker/useMobilePicker.js +23 -18
- package/internals/hooks/useMobilePicker/useMobilePicker.types.d.ts +12 -12
- package/internals/hooks/usePicker/usePicker.d.ts +2 -2
- package/internals/hooks/usePicker/usePicker.js +12 -4
- package/internals/hooks/usePicker/usePicker.types.d.ts +7 -5
- package/internals/hooks/usePicker/usePickerLayoutProps.d.ts +2 -3
- package/internals/hooks/usePicker/usePickerOwnerState.d.ts +4 -3
- package/internals/hooks/usePicker/usePickerOwnerState.js +9 -6
- package/internals/hooks/usePicker/usePickerProvider.d.ts +10 -0
- package/internals/hooks/usePicker/usePickerProvider.js +21 -0
- package/internals/hooks/usePicker/usePickerValue.d.ts +2 -2
- package/internals/hooks/usePicker/usePickerValue.js +2 -7
- package/internals/hooks/usePicker/usePickerValue.types.d.ts +32 -34
- package/internals/hooks/usePicker/usePickerViews.d.ts +6 -11
- package/internals/hooks/usePickerPrivateContext.d.ts +4 -0
- package/internals/hooks/usePickerPrivateContext.js +9 -0
- package/internals/hooks/useStaticPicker/useStaticPicker.d.ts +1 -2
- package/internals/hooks/useStaticPicker/useStaticPicker.js +5 -4
- package/internals/hooks/useStaticPicker/useStaticPicker.types.d.ts +6 -6
- package/internals/hooks/useUtils.d.ts +7 -7
- package/internals/hooks/useValueWithTimezone.d.ts +5 -5
- package/internals/hooks/useViews.d.ts +3 -3
- package/internals/hooks/useViews.js +1 -1
- package/internals/index.d.ts +6 -4
- package/internals/index.js +2 -1
- package/internals/models/fields.d.ts +32 -7
- package/internals/models/formProps.d.ts +14 -0
- package/internals/models/helpers.d.ts +0 -4
- package/internals/models/index.d.ts +2 -0
- package/internals/models/index.js +3 -1
- package/internals/models/props/basePickerProps.d.ts +5 -6
- package/internals/models/props/{clock.d.ts → time.d.ts} +10 -17
- package/internals/models/props/toolbar.d.ts +2 -3
- package/internals/models/validation.d.ts +21 -25
- package/internals/models/value.d.ts +3 -0
- package/internals/models/value.js +1 -0
- package/internals/utils/date-time-utils.d.ts +7 -7
- package/internals/utils/date-utils.d.ts +16 -16
- package/internals/utils/getDefaultReferenceDate.d.ts +10 -10
- package/internals/utils/time-utils.d.ts +5 -5
- package/internals/utils/valueManagers.d.ts +3 -3
- package/locales/beBY.d.ts +3 -3
- package/locales/beBY.js +3 -3
- package/locales/bgBG.d.ts +3 -3
- package/locales/bgBG.js +3 -3
- package/locales/caES.d.ts +3 -3
- package/locales/caES.js +3 -3
- package/locales/csCZ.d.ts +3 -3
- package/locales/csCZ.js +3 -3
- package/locales/daDK.d.ts +3 -3
- package/locales/daDK.js +3 -3
- package/locales/deDE.d.ts +3 -3
- package/locales/deDE.js +3 -3
- package/locales/elGR.d.ts +3 -3
- package/locales/elGR.js +12 -13
- package/locales/enUS.d.ts +4 -4
- package/locales/enUS.js +3 -3
- package/locales/esES.d.ts +3 -3
- package/locales/esES.js +3 -3
- package/locales/eu.d.ts +3 -3
- package/locales/eu.js +3 -3
- package/locales/faIR.d.ts +3 -3
- package/locales/faIR.js +3 -3
- package/locales/fiFI.d.ts +3 -3
- package/locales/fiFI.js +3 -3
- package/locales/frFR.d.ts +3 -3
- package/locales/frFR.js +3 -3
- package/locales/heIL.d.ts +3 -3
- package/locales/heIL.js +3 -3
- package/locales/hrHR.d.ts +3 -3
- package/locales/hrHR.js +3 -3
- package/locales/huHU.d.ts +3 -3
- package/locales/huHU.js +3 -3
- package/locales/isIS.d.ts +3 -3
- package/locales/isIS.js +3 -3
- package/locales/itIT.d.ts +3 -3
- package/locales/itIT.js +3 -3
- package/locales/jaJP.d.ts +3 -3
- package/locales/jaJP.js +3 -3
- package/locales/koKR.d.ts +3 -3
- package/locales/koKR.js +3 -3
- package/locales/kzKZ.d.ts +3 -3
- package/locales/kzKZ.js +3 -3
- package/locales/mk.d.ts +3 -3
- package/locales/mk.js +3 -3
- package/locales/nbNO.d.ts +3 -3
- package/locales/nbNO.js +3 -3
- package/locales/nlNL.d.ts +3 -3
- package/locales/nlNL.js +3 -3
- package/locales/nnNO.d.ts +3 -3
- package/locales/nnNO.js +3 -3
- package/locales/plPL.d.ts +3 -3
- package/locales/plPL.js +3 -3
- package/locales/ptBR.d.ts +3 -3
- package/locales/ptBR.js +5 -3
- package/locales/ptPT.d.ts +3 -3
- package/locales/ptPT.js +3 -3
- package/locales/roRO.d.ts +3 -3
- package/locales/roRO.js +3 -3
- package/locales/ruRU.d.ts +3 -3
- package/locales/ruRU.js +3 -3
- package/locales/skSK.d.ts +3 -3
- package/locales/skSK.js +3 -3
- package/locales/svSE.d.ts +3 -3
- package/locales/svSE.js +3 -3
- package/locales/trTR.d.ts +3 -3
- package/locales/trTR.js +3 -3
- package/locales/ukUA.d.ts +3 -3
- package/locales/ukUA.js +3 -3
- package/locales/urPK.d.ts +3 -3
- package/locales/urPK.js +3 -3
- package/locales/utils/getPickersLocalization.d.ts +9 -9
- package/locales/utils/getPickersLocalization.js +1 -1
- package/locales/utils/pickersLocaleTextApi.d.ts +12 -36
- package/locales/viVN.d.ts +3 -3
- package/locales/viVN.js +3 -3
- package/locales/zhCN.d.ts +3 -3
- package/locales/zhCN.js +3 -3
- package/locales/zhHK.d.ts +3 -3
- package/locales/zhHK.js +3 -3
- package/models/adapters.d.ts +151 -202
- package/models/fields.d.ts +9 -41
- package/models/pickers.d.ts +10 -6
- package/modern/DateCalendar/DateCalendar.js +20 -22
- package/modern/DateCalendar/DayCalendar.js +13 -10
- package/modern/DateField/DateField.js +8 -10
- package/modern/DatePicker/DatePicker.js +15 -14
- package/modern/DatePicker/DatePickerToolbar.js +12 -2
- package/modern/DateTimeField/DateTimeField.js +9 -12
- package/modern/DateTimePicker/DateTimePicker.js +16 -16
- package/modern/DateTimePicker/DateTimePickerTabs.js +2 -2
- package/modern/DateTimePicker/DateTimePickerToolbar.js +12 -2
- package/modern/DesktopDatePicker/DesktopDatePicker.js +17 -16
- package/modern/DesktopDateTimePicker/DesktopDateTimePicker.js +18 -18
- package/modern/DesktopDateTimePicker/DesktopDateTimePickerLayout.js +10 -0
- package/modern/DesktopTimePicker/DesktopTimePicker.js +11 -6
- package/modern/DigitalClock/DigitalClock.js +7 -6
- package/modern/MobileDatePicker/MobileDatePicker.js +17 -16
- package/modern/MobileDateTimePicker/MobileDateTimePicker.js +18 -18
- package/modern/MobileTimePicker/MobileTimePicker.js +11 -6
- package/modern/MonthCalendar/MonthCalendar.js +17 -14
- package/modern/MonthCalendar/PickersMonth.js +17 -13
- package/modern/MultiSectionDigitalClock/MultiSectionDigitalClock.js +7 -6
- package/modern/PickersActionBar/PickersActionBar.js +2 -2
- package/modern/PickersCalendarHeader/PickersCalendarHeader.js +2 -2
- package/modern/PickersLayout/PickersLayout.js +10 -0
- package/modern/PickersLayout/usePickerLayout.js +17 -18
- package/modern/StaticDatePicker/StaticDatePicker.js +14 -13
- package/modern/StaticDateTimePicker/StaticDateTimePicker.js +15 -15
- package/modern/StaticTimePicker/StaticTimePicker.js +8 -3
- package/modern/TimeClock/Clock.js +3 -3
- package/modern/TimeClock/TimeClock.js +7 -6
- package/modern/TimeField/TimeField.js +6 -6
- package/modern/TimePicker/TimePicker.js +9 -4
- package/modern/TimePicker/TimePickerToolbar.js +12 -2
- package/modern/YearCalendar/PickersYear.js +17 -13
- package/modern/YearCalendar/YearCalendar.js +17 -14
- package/modern/hooks/index.js +2 -2
- package/modern/hooks/useClearableField.js +4 -3
- package/modern/hooks/useParsedFormat.js +2 -2
- package/modern/hooks/usePickerContext.js +15 -0
- package/{hooks/usePickersTranslations.js → modern/hooks/usePickerTranslations.js} +1 -1
- package/modern/index.js +1 -1
- package/modern/internals/components/PickerProvider.js +38 -0
- package/modern/internals/hooks/useDesktopPicker/useDesktopPicker.js +21 -17
- package/modern/internals/hooks/useField/useField.js +1 -1
- package/modern/internals/hooks/useField/useField.utils.js +2 -1
- package/modern/internals/hooks/useField/useFieldState.js +3 -3
- package/modern/internals/hooks/useField/useFieldV7TextField.js +2 -2
- package/modern/internals/hooks/useMobilePicker/useMobilePicker.js +23 -18
- package/modern/internals/hooks/usePicker/usePicker.js +12 -4
- package/modern/internals/hooks/usePicker/usePickerOwnerState.js +9 -6
- package/modern/internals/hooks/usePicker/usePickerProvider.js +21 -0
- package/modern/internals/hooks/usePicker/usePickerValue.js +2 -7
- package/modern/internals/hooks/usePickerPrivateContext.js +9 -0
- package/modern/internals/hooks/useStaticPicker/useStaticPicker.js +5 -4
- package/modern/internals/hooks/useViews.js +1 -1
- package/modern/internals/index.js +2 -1
- package/modern/internals/models/formProps.js +1 -0
- package/modern/internals/models/index.js +3 -1
- package/modern/internals/models/props/time.js +1 -0
- package/modern/internals/models/value.js +1 -0
- package/modern/locales/beBY.js +3 -3
- package/modern/locales/bgBG.js +3 -3
- package/modern/locales/caES.js +3 -3
- package/modern/locales/csCZ.js +3 -3
- package/modern/locales/daDK.js +3 -3
- package/modern/locales/deDE.js +3 -3
- package/modern/locales/elGR.js +12 -13
- package/modern/locales/enUS.js +3 -3
- package/modern/locales/esES.js +3 -3
- package/modern/locales/eu.js +3 -3
- package/modern/locales/faIR.js +3 -3
- package/modern/locales/fiFI.js +3 -3
- package/modern/locales/frFR.js +3 -3
- package/modern/locales/heIL.js +3 -3
- package/modern/locales/hrHR.js +3 -3
- package/modern/locales/huHU.js +3 -3
- package/modern/locales/isIS.js +3 -3
- package/modern/locales/itIT.js +3 -3
- package/modern/locales/jaJP.js +3 -3
- package/modern/locales/koKR.js +3 -3
- package/modern/locales/kzKZ.js +3 -3
- package/modern/locales/mk.js +3 -3
- package/modern/locales/nbNO.js +3 -3
- package/modern/locales/nlNL.js +3 -3
- package/modern/locales/nnNO.js +3 -3
- package/modern/locales/plPL.js +3 -3
- package/modern/locales/ptBR.js +5 -3
- package/modern/locales/ptPT.js +3 -3
- package/modern/locales/roRO.js +3 -3
- package/modern/locales/ruRU.js +3 -3
- package/modern/locales/skSK.js +3 -3
- package/modern/locales/svSE.js +3 -3
- package/modern/locales/trTR.js +3 -3
- package/modern/locales/ukUA.js +3 -3
- package/modern/locales/urPK.js +3 -3
- package/modern/locales/utils/getPickersLocalization.js +1 -1
- package/modern/locales/viVN.js +3 -3
- package/modern/locales/zhCN.js +3 -3
- package/modern/locales/zhHK.js +3 -3
- package/modern/validation/useValidation.js +2 -3
- package/modern/validation/validateDate.js +5 -0
- package/modern/validation/validateDateTime.js +5 -0
- package/modern/validation/validateTime.js +5 -0
- package/node/DateCalendar/DateCalendar.js +20 -22
- package/node/DateCalendar/DayCalendar.js +13 -10
- package/node/DateField/DateField.js +8 -10
- package/node/DatePicker/DatePicker.js +15 -14
- package/node/DatePicker/DatePickerToolbar.js +12 -2
- package/node/DateTimeField/DateTimeField.js +9 -12
- package/node/DateTimePicker/DateTimePicker.js +16 -16
- package/node/DateTimePicker/DateTimePickerTabs.js +2 -2
- package/node/DateTimePicker/DateTimePickerToolbar.js +12 -2
- package/node/DesktopDatePicker/DesktopDatePicker.js +17 -16
- package/node/DesktopDateTimePicker/DesktopDateTimePicker.js +18 -18
- package/node/DesktopDateTimePicker/DesktopDateTimePickerLayout.js +10 -0
- package/node/DesktopTimePicker/DesktopTimePicker.js +11 -6
- package/node/DigitalClock/DigitalClock.js +7 -6
- package/node/MobileDatePicker/MobileDatePicker.js +17 -16
- package/node/MobileDateTimePicker/MobileDateTimePicker.js +18 -18
- package/node/MobileTimePicker/MobileTimePicker.js +11 -6
- package/node/MonthCalendar/MonthCalendar.js +17 -14
- package/node/MonthCalendar/PickersMonth.js +17 -13
- package/node/MultiSectionDigitalClock/MultiSectionDigitalClock.js +7 -6
- package/node/PickersActionBar/PickersActionBar.js +2 -2
- package/node/PickersCalendarHeader/PickersCalendarHeader.js +2 -2
- package/node/PickersLayout/PickersLayout.js +10 -0
- package/node/PickersLayout/usePickerLayout.js +17 -18
- package/node/StaticDatePicker/StaticDatePicker.js +14 -13
- package/node/StaticDateTimePicker/StaticDateTimePicker.js +15 -15
- package/node/StaticTimePicker/StaticTimePicker.js +8 -3
- package/node/TimeClock/Clock.js +3 -3
- package/node/TimeClock/TimeClock.js +7 -6
- package/node/TimeField/TimeField.js +6 -6
- package/node/TimePicker/TimePicker.js +9 -4
- package/node/TimePicker/TimePickerToolbar.js +12 -2
- package/node/YearCalendar/PickersYear.js +17 -13
- package/node/YearCalendar/YearCalendar.js +17 -14
- package/node/hooks/index.js +6 -6
- package/node/hooks/useClearableField.js +4 -3
- package/node/hooks/useParsedFormat.js +2 -2
- package/node/hooks/usePickerContext.js +21 -0
- package/node/hooks/usePickerTranslations.js +10 -0
- package/node/index.js +1 -1
- package/node/internals/components/PickerProvider.js +46 -0
- package/node/internals/hooks/useDesktopPicker/useDesktopPicker.js +21 -17
- package/node/internals/hooks/useField/useField.js +1 -1
- package/node/internals/hooks/useField/useField.utils.js +2 -1
- package/node/internals/hooks/useField/useFieldState.js +3 -3
- package/node/internals/hooks/useField/useFieldV7TextField.js +2 -2
- package/node/internals/hooks/useMobilePicker/useMobilePicker.js +23 -18
- package/node/internals/hooks/usePicker/usePicker.js +12 -4
- package/node/internals/hooks/usePicker/usePickerOwnerState.js +9 -6
- package/node/internals/hooks/usePicker/usePickerProvider.js +28 -0
- package/node/internals/hooks/usePicker/usePickerValue.js +1 -7
- package/node/internals/hooks/usePickerPrivateContext.js +15 -0
- package/node/internals/hooks/useStaticPicker/useStaticPicker.js +5 -4
- package/node/internals/hooks/useViews.js +3 -3
- package/node/internals/index.js +14 -7
- package/node/internals/models/index.js +22 -0
- package/node/internals/models/props/time.js +5 -0
- package/node/internals/models/value.js +5 -0
- package/node/locales/beBY.js +3 -3
- package/node/locales/bgBG.js +3 -3
- package/node/locales/caES.js +3 -3
- package/node/locales/csCZ.js +3 -3
- package/node/locales/daDK.js +3 -3
- package/node/locales/deDE.js +3 -3
- package/node/locales/elGR.js +12 -13
- package/node/locales/enUS.js +3 -3
- package/node/locales/esES.js +3 -3
- package/node/locales/eu.js +3 -3
- package/node/locales/faIR.js +3 -3
- package/node/locales/fiFI.js +3 -3
- package/node/locales/frFR.js +3 -3
- package/node/locales/heIL.js +3 -3
- package/node/locales/hrHR.js +3 -3
- package/node/locales/huHU.js +3 -3
- package/node/locales/isIS.js +3 -3
- package/node/locales/itIT.js +3 -3
- package/node/locales/jaJP.js +3 -3
- package/node/locales/koKR.js +3 -3
- package/node/locales/kzKZ.js +3 -3
- package/node/locales/mk.js +3 -3
- package/node/locales/nbNO.js +3 -3
- package/node/locales/nlNL.js +3 -3
- package/node/locales/nnNO.js +3 -3
- package/node/locales/plPL.js +3 -3
- package/node/locales/ptBR.js +5 -3
- package/node/locales/ptPT.js +3 -3
- package/node/locales/roRO.js +3 -3
- package/node/locales/ruRU.js +3 -3
- package/node/locales/skSK.js +3 -3
- package/node/locales/svSE.js +3 -3
- package/node/locales/trTR.js +3 -3
- package/node/locales/ukUA.js +3 -3
- package/node/locales/urPK.js +3 -3
- package/node/locales/utils/getPickersLocalization.js +1 -1
- package/node/locales/viVN.js +3 -3
- package/node/locales/zhCN.js +3 -3
- package/node/locales/zhHK.js +3 -3
- package/node/validation/useValidation.js +2 -3
- package/node/validation/validateDate.js +4 -0
- package/node/validation/validateDateTime.js +4 -0
- package/node/validation/validateTime.js +4 -0
- package/package.json +4 -4
- package/themeAugmentation/props.d.ts +28 -28
- package/timeViewRenderers/timeViewRenderers.d.ts +6 -6
- package/validation/extractValidationProps.d.ts +4 -4
- package/validation/useValidation.d.ts +9 -10
- package/validation/useValidation.js +2 -3
- package/validation/validateDate.d.ts +7 -2
- package/validation/validateDate.js +5 -0
- package/validation/validateDateTime.d.ts +10 -4
- package/validation/validateDateTime.js +5 -0
- package/validation/validateTime.d.ts +7 -2
- package/validation/validateTime.js +5 -0
- package/hooks/usePickersContext.d.ts +0 -4
- package/hooks/usePickersContext.js +0 -15
- package/hooks/usePickersTranslations.d.ts +0 -2
- package/internals/components/PickersProvider.js +0 -26
- package/modern/hooks/usePickersContext.js +0 -15
- package/modern/internals/components/PickersProvider.js +0 -26
- package/node/hooks/usePickersContext.js +0 -21
- package/node/hooks/usePickersTranslations.js +0 -10
- package/node/internals/components/PickersProvider.js +0 -34
- /package/internals/models/{props/clock.js → formProps.js} +0 -0
- /package/{modern/internals/models/props/clock.js → internals/models/props/time.js} +0 -0
- /package/node/internals/models/{props/clock.js → formProps.js} +0 -0
|
@@ -12,7 +12,7 @@ import clsx from 'clsx';
|
|
|
12
12
|
import { PickersToolbarText } from "../internals/components/PickersToolbarText.js";
|
|
13
13
|
import { PickersToolbar } from "../internals/components/PickersToolbar.js";
|
|
14
14
|
import { PickersToolbarButton } from "../internals/components/PickersToolbarButton.js";
|
|
15
|
-
import {
|
|
15
|
+
import { usePickerTranslations } from "../hooks/usePickerTranslations.js";
|
|
16
16
|
import { useUtils } from "../internals/hooks/useUtils.js";
|
|
17
17
|
import { dateTimePickerToolbarClasses, getDateTimePickerToolbarUtilityClass } from "./dateTimePickerToolbarClasses.js";
|
|
18
18
|
import { useMeridiemMode } from "../internals/hooks/date-helpers-hooks.js";
|
|
@@ -244,7 +244,7 @@ function DateTimePickerToolbar(inProps) {
|
|
|
244
244
|
} = useMeridiemMode(value, ampm, onChange);
|
|
245
245
|
const showAmPmControl = Boolean(ampm && !ampmInClock);
|
|
246
246
|
const isDesktop = toolbarVariant === 'desktop';
|
|
247
|
-
const translations =
|
|
247
|
+
const translations = usePickerTranslations();
|
|
248
248
|
const classes = useUtilityClasses(ownerState);
|
|
249
249
|
const toolbarTitle = inToolbarTitle ?? translations.dateTimePickerToolbarTitle;
|
|
250
250
|
const formatHours = time => ampm ? utils.format(time, 'hours12h') : utils.format(time, 'hours24h');
|
|
@@ -359,6 +359,11 @@ process.env.NODE_ENV !== "production" ? DateTimePickerToolbar.propTypes = {
|
|
|
359
359
|
*/
|
|
360
360
|
classes: PropTypes.object,
|
|
361
361
|
className: PropTypes.string,
|
|
362
|
+
/**
|
|
363
|
+
* If `true`, the component is disabled.
|
|
364
|
+
* When disabled, the value cannot be changed and no interaction is possible.
|
|
365
|
+
* @default false
|
|
366
|
+
*/
|
|
362
367
|
disabled: PropTypes.bool,
|
|
363
368
|
/**
|
|
364
369
|
* If `true`, show the toolbar even in desktop mode.
|
|
@@ -373,6 +378,11 @@ process.env.NODE_ENV !== "production" ? DateTimePickerToolbar.propTypes = {
|
|
|
373
378
|
* @param {TView} view The view to open
|
|
374
379
|
*/
|
|
375
380
|
onViewChange: PropTypes.func.isRequired,
|
|
381
|
+
/**
|
|
382
|
+
* If `true`, the component is read-only.
|
|
383
|
+
* When read-only, the value cannot be changed but the user can interact with the interface.
|
|
384
|
+
* @default false
|
|
385
|
+
*/
|
|
376
386
|
readOnly: PropTypes.bool,
|
|
377
387
|
/**
|
|
378
388
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { DefaultizedProps } from '
|
|
2
|
+
import { DefaultizedProps } from '@mui/x-internals/types';
|
|
3
3
|
import { DateTimeValidationError, PickerValidDate } from '../models';
|
|
4
4
|
import { DateCalendarSlots, DateCalendarSlotProps, ExportedDateCalendarProps } from '../DateCalendar/DateCalendar.types';
|
|
5
5
|
import { TimeClockSlots, TimeClockSlotProps } from '../TimeClock/TimeClock.types';
|
|
@@ -11,9 +11,9 @@ import { DateTimePickerToolbarProps, ExportedDateTimePickerToolbarProps } from '
|
|
|
11
11
|
import { PickerViewRendererLookup } from '../internals/hooks/usePicker/usePickerViews';
|
|
12
12
|
import { DateViewRendererProps } from '../dateViewRenderers';
|
|
13
13
|
import { TimeViewRendererProps } from '../timeViewRenderers';
|
|
14
|
-
import { BaseClockProps, ExportedBaseClockProps } from '../internals/models/props/
|
|
14
|
+
import { BaseClockProps, ExportedBaseClockProps } from '../internals/models/props/time';
|
|
15
15
|
import { DateOrTimeViewWithMeridiem, TimeViewWithMeridiem } from '../internals/models';
|
|
16
|
-
export interface BaseDateTimePickerSlots
|
|
16
|
+
export interface BaseDateTimePickerSlots extends DateCalendarSlots, TimeClockSlots {
|
|
17
17
|
/**
|
|
18
18
|
* Tabs enabling toggling between date and time pickers.
|
|
19
19
|
* @default DateTimePickerTabs
|
|
@@ -23,9 +23,9 @@ export interface BaseDateTimePickerSlots<TDate extends PickerValidDate> extends
|
|
|
23
23
|
* Custom component for the toolbar rendered above the views.
|
|
24
24
|
* @default DateTimePickerToolbar
|
|
25
25
|
*/
|
|
26
|
-
toolbar?: React.JSXElementConstructor<DateTimePickerToolbarProps
|
|
26
|
+
toolbar?: React.JSXElementConstructor<DateTimePickerToolbarProps>;
|
|
27
27
|
}
|
|
28
|
-
export interface BaseDateTimePickerSlotProps
|
|
28
|
+
export interface BaseDateTimePickerSlotProps extends DateCalendarSlotProps, TimeClockSlotProps {
|
|
29
29
|
/**
|
|
30
30
|
* Props passed down to the tabs component.
|
|
31
31
|
*/
|
|
@@ -35,8 +35,8 @@ export interface BaseDateTimePickerSlotProps<TDate extends PickerValidDate> exte
|
|
|
35
35
|
*/
|
|
36
36
|
toolbar?: ExportedDateTimePickerToolbarProps;
|
|
37
37
|
}
|
|
38
|
-
export type DateTimePickerViewRenderers<
|
|
39
|
-
export interface BaseDateTimePickerProps<
|
|
38
|
+
export type DateTimePickerViewRenderers<TView extends DateOrTimeViewWithMeridiem, TAdditionalProps extends {} = {}> = PickerViewRendererLookup<PickerValidDate | null, TView, Omit<DateViewRendererProps<TView>, 'slots' | 'slotProps'> & Omit<TimeViewRendererProps<TimeViewWithMeridiem, BaseClockProps<TimeViewWithMeridiem>>, 'slots' | 'slotProps'>, TAdditionalProps>;
|
|
39
|
+
export interface BaseDateTimePickerProps<TView extends DateOrTimeViewWithMeridiem> extends BasePickerInputProps<PickerValidDate | null, TView, DateTimeValidationError>, Omit<ExportedDateCalendarProps, 'onViewChange'>, ExportedBaseClockProps, DateTimeValidationProps {
|
|
40
40
|
/**
|
|
41
41
|
* Display ampm controls under the clock (instead of in the toolbar).
|
|
42
42
|
* @default true on desktop, false on mobile
|
|
@@ -46,19 +46,19 @@ export interface BaseDateTimePickerProps<TDate extends PickerValidDate, TView ex
|
|
|
46
46
|
* Overridable component slots.
|
|
47
47
|
* @default {}
|
|
48
48
|
*/
|
|
49
|
-
slots?: BaseDateTimePickerSlots
|
|
49
|
+
slots?: BaseDateTimePickerSlots;
|
|
50
50
|
/**
|
|
51
51
|
* The props used for each component slot.
|
|
52
52
|
* @default {}
|
|
53
53
|
*/
|
|
54
|
-
slotProps?: BaseDateTimePickerSlotProps
|
|
54
|
+
slotProps?: BaseDateTimePickerSlotProps;
|
|
55
55
|
/**
|
|
56
56
|
* Define custom view renderers for each section.
|
|
57
57
|
* If `null`, the section will only have field editing.
|
|
58
58
|
* If `undefined`, internally defined view will be used.
|
|
59
59
|
*/
|
|
60
|
-
viewRenderers?: Partial<DateTimePickerViewRenderers<
|
|
60
|
+
viewRenderers?: Partial<DateTimePickerViewRenderers<TView>>;
|
|
61
61
|
}
|
|
62
|
-
type UseDateTimePickerDefaultizedProps<
|
|
63
|
-
export declare function useDateTimePickerDefaultizedProps<
|
|
62
|
+
type UseDateTimePickerDefaultizedProps<TView extends DateOrTimeViewWithMeridiem, Props extends BaseDateTimePickerProps<TView>> = LocalizedComponent<DefaultizedProps<Props, 'views' | 'openTo' | 'orientation' | 'ampm' | keyof BaseDateValidationProps | keyof BaseTimeValidationProps>>;
|
|
63
|
+
export declare function useDateTimePickerDefaultizedProps<TView extends DateOrTimeViewWithMeridiem, Props extends BaseDateTimePickerProps<TView>>(props: Props, name: string): UseDateTimePickerDefaultizedProps<TView, Props>;
|
|
64
64
|
export {};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { DesktopDatePickerProps } from './DesktopDatePicker.types';
|
|
3
|
-
|
|
4
|
-
type DesktopDatePickerComponent = (<TDate extends PickerValidDate, TEnableAccessibleFieldDOMStructure extends boolean = false>(props: DesktopDatePickerProps<TDate, TEnableAccessibleFieldDOMStructure> & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
|
|
3
|
+
type DesktopDatePickerComponent = (<TEnableAccessibleFieldDOMStructure extends boolean = true>(props: DesktopDatePickerProps<TEnableAccessibleFieldDOMStructure> & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
|
|
5
4
|
propTypes?: any;
|
|
6
5
|
};
|
|
7
6
|
/**
|
|
@@ -7,7 +7,7 @@ import resolveComponentProps from '@mui/utils/resolveComponentProps';
|
|
|
7
7
|
import { refType } from '@mui/utils';
|
|
8
8
|
import { singleItemValueManager } from "../internals/utils/valueManagers.js";
|
|
9
9
|
import { useDatePickerDefaultizedProps } from "../DatePicker/shared.js";
|
|
10
|
-
import {
|
|
10
|
+
import { usePickerTranslations } from "../hooks/usePickerTranslations.js";
|
|
11
11
|
import { useUtils } from "../internals/hooks/useUtils.js";
|
|
12
12
|
import { validateDate, extractValidationProps } from "../validation/index.js";
|
|
13
13
|
import { useDesktopPicker } from "../internals/hooks/useDesktopPicker/index.js";
|
|
@@ -27,7 +27,7 @@ import { buildGetOpenDialogAriaText } from "../locales/utils/getPickersLocalizat
|
|
|
27
27
|
* - [DesktopDatePicker API](https://mui.com/x/api/date-pickers/desktop-date-picker/)
|
|
28
28
|
*/
|
|
29
29
|
const DesktopDatePicker = /*#__PURE__*/React.forwardRef(function DesktopDatePicker(inProps, ref) {
|
|
30
|
-
const translations =
|
|
30
|
+
const translations = usePickerTranslations();
|
|
31
31
|
const utils = useUtils();
|
|
32
32
|
|
|
33
33
|
// Props with the default values common to all date pickers
|
|
@@ -92,9 +92,9 @@ DesktopDatePicker.propTypes = {
|
|
|
92
92
|
closeOnSelect: PropTypes.bool,
|
|
93
93
|
/**
|
|
94
94
|
* Formats the day of week displayed in the calendar header.
|
|
95
|
-
* @param {
|
|
95
|
+
* @param {PickerValidDate} date The date of the day of week provided by the adapter.
|
|
96
96
|
* @returns {string} The name to display.
|
|
97
|
-
* @default (date:
|
|
97
|
+
* @default (date: PickerValidDate) => adapter.format(date, 'weekdayShort').charAt(0).toUpperCase()
|
|
98
98
|
*/
|
|
99
99
|
dayOfWeekFormatter: PropTypes.func,
|
|
100
100
|
/**
|
|
@@ -103,7 +103,8 @@ DesktopDatePicker.propTypes = {
|
|
|
103
103
|
*/
|
|
104
104
|
defaultValue: PropTypes.object,
|
|
105
105
|
/**
|
|
106
|
-
* If `true`, the
|
|
106
|
+
* If `true`, the component is disabled.
|
|
107
|
+
* When disabled, the value cannot be changed and no interaction is possible.
|
|
107
108
|
* @default false
|
|
108
109
|
*/
|
|
109
110
|
disabled: PropTypes.bool,
|
|
@@ -132,7 +133,7 @@ DesktopDatePicker.propTypes = {
|
|
|
132
133
|
*/
|
|
133
134
|
displayWeekNumber: PropTypes.bool,
|
|
134
135
|
/**
|
|
135
|
-
* @default
|
|
136
|
+
* @default true
|
|
136
137
|
*/
|
|
137
138
|
enableAccessibleFieldDOMStructure: PropTypes.any,
|
|
138
139
|
/**
|
|
@@ -222,8 +223,7 @@ DesktopDatePicker.propTypes = {
|
|
|
222
223
|
onError: PropTypes.func,
|
|
223
224
|
/**
|
|
224
225
|
* Callback fired on month change.
|
|
225
|
-
* @
|
|
226
|
-
* @param {TDate} month The new month.
|
|
226
|
+
* @param {PickerValidDate} month The new month.
|
|
227
227
|
*/
|
|
228
228
|
onMonthChange: PropTypes.func,
|
|
229
229
|
/**
|
|
@@ -244,8 +244,7 @@ DesktopDatePicker.propTypes = {
|
|
|
244
244
|
onViewChange: PropTypes.func,
|
|
245
245
|
/**
|
|
246
246
|
* Callback fired on year change.
|
|
247
|
-
* @
|
|
248
|
-
* @param {TDate} year The new year.
|
|
247
|
+
* @param {PickerValidDate} year The new year.
|
|
249
248
|
*/
|
|
250
249
|
onYearChange: PropTypes.func,
|
|
251
250
|
/**
|
|
@@ -263,6 +262,11 @@ DesktopDatePicker.propTypes = {
|
|
|
263
262
|
* Force rendering in particular orientation.
|
|
264
263
|
*/
|
|
265
264
|
orientation: PropTypes.oneOf(['landscape', 'portrait']),
|
|
265
|
+
/**
|
|
266
|
+
* If `true`, the component is read-only.
|
|
267
|
+
* When read-only, the value cannot be changed but the user can interact with the interface.
|
|
268
|
+
* @default false
|
|
269
|
+
*/
|
|
266
270
|
readOnly: PropTypes.bool,
|
|
267
271
|
/**
|
|
268
272
|
* If `true`, disable heavy animations.
|
|
@@ -295,22 +299,19 @@ DesktopDatePicker.propTypes = {
|
|
|
295
299
|
*
|
|
296
300
|
* Warning: This function can be called multiple times (for example when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance.
|
|
297
301
|
*
|
|
298
|
-
* @
|
|
299
|
-
* @param {TDate} day The date to test.
|
|
302
|
+
* @param {PickerValidDate} day The date to test.
|
|
300
303
|
* @returns {boolean} If `true` the date will be disabled.
|
|
301
304
|
*/
|
|
302
305
|
shouldDisableDate: PropTypes.func,
|
|
303
306
|
/**
|
|
304
307
|
* Disable specific month.
|
|
305
|
-
* @
|
|
306
|
-
* @param {TDate} month The month to test.
|
|
308
|
+
* @param {PickerValidDate} month The month to test.
|
|
307
309
|
* @returns {boolean} If `true`, the month will be disabled.
|
|
308
310
|
*/
|
|
309
311
|
shouldDisableMonth: PropTypes.func,
|
|
310
312
|
/**
|
|
311
313
|
* Disable specific year.
|
|
312
|
-
* @
|
|
313
|
-
* @param {TDate} year The year to test.
|
|
314
|
+
* @param {PickerValidDate} year The year to test.
|
|
314
315
|
* @returns {boolean} If `true`, the year will be disabled.
|
|
315
316
|
*/
|
|
316
317
|
shouldDisableYear: PropTypes.func,
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
+
import { MakeOptional } from '@mui/x-internals/types';
|
|
1
2
|
import { UseDesktopPickerSlots, ExportedUseDesktopPickerSlotProps, DesktopOnlyPickerProps } from '../internals/hooks/useDesktopPicker';
|
|
2
3
|
import { BaseDatePickerProps, BaseDatePickerSlots, BaseDatePickerSlotProps } from '../DatePicker/shared';
|
|
3
|
-
import {
|
|
4
|
-
import { DateView, PickerValidDate } from '../models';
|
|
4
|
+
import { DateView } from '../models';
|
|
5
5
|
import { ExportedYearCalendarProps } from '../YearCalendar/YearCalendar.types';
|
|
6
|
-
export interface DesktopDatePickerSlots
|
|
6
|
+
export interface DesktopDatePickerSlots extends BaseDatePickerSlots, MakeOptional<UseDesktopPickerSlots<DateView>, 'field' | 'openPickerIcon'> {
|
|
7
7
|
}
|
|
8
|
-
export interface DesktopDatePickerSlotProps<
|
|
8
|
+
export interface DesktopDatePickerSlotProps<TEnableAccessibleFieldDOMStructure extends boolean> extends BaseDatePickerSlotProps, ExportedUseDesktopPickerSlotProps<DateView, TEnableAccessibleFieldDOMStructure> {
|
|
9
9
|
}
|
|
10
|
-
export interface DesktopDatePickerProps<
|
|
10
|
+
export interface DesktopDatePickerProps<TEnableAccessibleFieldDOMStructure extends boolean = true> extends BaseDatePickerProps, DesktopOnlyPickerProps, ExportedYearCalendarProps {
|
|
11
11
|
/**
|
|
12
12
|
* Overridable component slots.
|
|
13
13
|
* @default {}
|
|
14
14
|
*/
|
|
15
|
-
slots?: DesktopDatePickerSlots
|
|
15
|
+
slots?: DesktopDatePickerSlots;
|
|
16
16
|
/**
|
|
17
17
|
* The props used for each component slot.
|
|
18
18
|
* @default {}
|
|
19
19
|
*/
|
|
20
|
-
slotProps?: DesktopDatePickerSlotProps<
|
|
20
|
+
slotProps?: DesktopDatePickerSlotProps<TEnableAccessibleFieldDOMStructure>;
|
|
21
21
|
/**
|
|
22
22
|
* Years rendered per row.
|
|
23
23
|
* @default 4
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { DesktopDateTimePickerProps } from './DesktopDateTimePicker.types';
|
|
3
|
-
|
|
4
|
-
type DesktopDateTimePickerComponent = (<TDate extends PickerValidDate, TEnableAccessibleFieldDOMStructure extends boolean = false>(props: DesktopDateTimePickerProps<TDate, TEnableAccessibleFieldDOMStructure> & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
|
|
3
|
+
type DesktopDateTimePickerComponent = (<TEnableAccessibleFieldDOMStructure extends boolean = true>(props: DesktopDateTimePickerProps<TEnableAccessibleFieldDOMStructure> & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
|
|
5
4
|
propTypes?: any;
|
|
6
5
|
};
|
|
7
6
|
/**
|
|
@@ -12,7 +12,7 @@ import { singleItemValueManager } from "../internals/utils/valueManagers.js";
|
|
|
12
12
|
import { DateTimeField } from "../DateTimeField/index.js";
|
|
13
13
|
import { useDateTimePickerDefaultizedProps } from "../DateTimePicker/shared.js";
|
|
14
14
|
import { renderDateViewCalendar } from "../dateViewRenderers/dateViewRenderers.js";
|
|
15
|
-
import {
|
|
15
|
+
import { usePickerTranslations } from "../hooks/usePickerTranslations.js";
|
|
16
16
|
import { useUtils } from "../internals/hooks/useUtils.js";
|
|
17
17
|
import { validateDateTime, extractValidationProps } from "../validation/index.js";
|
|
18
18
|
import { CalendarIcon } from "../icons/index.js";
|
|
@@ -83,7 +83,7 @@ const rendererInterceptor = function rendererInterceptor(inViewRenderers, popper
|
|
|
83
83
|
* - [DesktopDateTimePicker API](https://mui.com/x/api/date-pickers/desktop-date-time-picker/)
|
|
84
84
|
*/
|
|
85
85
|
const DesktopDateTimePicker = /*#__PURE__*/React.forwardRef(function DesktopDateTimePicker(inProps, ref) {
|
|
86
|
-
const translations =
|
|
86
|
+
const translations = usePickerTranslations();
|
|
87
87
|
const utils = useUtils();
|
|
88
88
|
|
|
89
89
|
// Props with the default values common to all date time pickers
|
|
@@ -189,9 +189,9 @@ DesktopDateTimePicker.propTypes = {
|
|
|
189
189
|
closeOnSelect: PropTypes.bool,
|
|
190
190
|
/**
|
|
191
191
|
* Formats the day of week displayed in the calendar header.
|
|
192
|
-
* @param {
|
|
192
|
+
* @param {PickerValidDate} date The date of the day of week provided by the adapter.
|
|
193
193
|
* @returns {string} The name to display.
|
|
194
|
-
* @default (date:
|
|
194
|
+
* @default (date: PickerValidDate) => adapter.format(date, 'weekdayShort').charAt(0).toUpperCase()
|
|
195
195
|
*/
|
|
196
196
|
dayOfWeekFormatter: PropTypes.func,
|
|
197
197
|
/**
|
|
@@ -200,7 +200,8 @@ DesktopDateTimePicker.propTypes = {
|
|
|
200
200
|
*/
|
|
201
201
|
defaultValue: PropTypes.object,
|
|
202
202
|
/**
|
|
203
|
-
* If `true`, the
|
|
203
|
+
* If `true`, the component is disabled.
|
|
204
|
+
* When disabled, the value cannot be changed and no interaction is possible.
|
|
204
205
|
* @default false
|
|
205
206
|
*/
|
|
206
207
|
disabled: PropTypes.bool,
|
|
@@ -234,7 +235,7 @@ DesktopDateTimePicker.propTypes = {
|
|
|
234
235
|
*/
|
|
235
236
|
displayWeekNumber: PropTypes.bool,
|
|
236
237
|
/**
|
|
237
|
-
* @default
|
|
238
|
+
* @default true
|
|
238
239
|
*/
|
|
239
240
|
enableAccessibleFieldDOMStructure: PropTypes.any,
|
|
240
241
|
/**
|
|
@@ -347,8 +348,7 @@ DesktopDateTimePicker.propTypes = {
|
|
|
347
348
|
onError: PropTypes.func,
|
|
348
349
|
/**
|
|
349
350
|
* Callback fired on month change.
|
|
350
|
-
* @
|
|
351
|
-
* @param {TDate} month The new month.
|
|
351
|
+
* @param {PickerValidDate} month The new month.
|
|
352
352
|
*/
|
|
353
353
|
onMonthChange: PropTypes.func,
|
|
354
354
|
/**
|
|
@@ -369,8 +369,7 @@ DesktopDateTimePicker.propTypes = {
|
|
|
369
369
|
onViewChange: PropTypes.func,
|
|
370
370
|
/**
|
|
371
371
|
* Callback fired on year change.
|
|
372
|
-
* @
|
|
373
|
-
* @param {TDate} year The new year.
|
|
372
|
+
* @param {PickerValidDate} year The new year.
|
|
374
373
|
*/
|
|
375
374
|
onYearChange: PropTypes.func,
|
|
376
375
|
/**
|
|
@@ -388,6 +387,11 @@ DesktopDateTimePicker.propTypes = {
|
|
|
388
387
|
* Force rendering in particular orientation.
|
|
389
388
|
*/
|
|
390
389
|
orientation: PropTypes.oneOf(['landscape', 'portrait']),
|
|
390
|
+
/**
|
|
391
|
+
* If `true`, the component is read-only.
|
|
392
|
+
* When read-only, the value cannot be changed but the user can interact with the interface.
|
|
393
|
+
* @default false
|
|
394
|
+
*/
|
|
391
395
|
readOnly: PropTypes.bool,
|
|
392
396
|
/**
|
|
393
397
|
* If `true`, disable heavy animations.
|
|
@@ -420,30 +424,26 @@ DesktopDateTimePicker.propTypes = {
|
|
|
420
424
|
*
|
|
421
425
|
* Warning: This function can be called multiple times (for example when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance.
|
|
422
426
|
*
|
|
423
|
-
* @
|
|
424
|
-
* @param {TDate} day The date to test.
|
|
427
|
+
* @param {PickerValidDate} day The date to test.
|
|
425
428
|
* @returns {boolean} If `true` the date will be disabled.
|
|
426
429
|
*/
|
|
427
430
|
shouldDisableDate: PropTypes.func,
|
|
428
431
|
/**
|
|
429
432
|
* Disable specific month.
|
|
430
|
-
* @
|
|
431
|
-
* @param {TDate} month The month to test.
|
|
433
|
+
* @param {PickerValidDate} month The month to test.
|
|
432
434
|
* @returns {boolean} If `true`, the month will be disabled.
|
|
433
435
|
*/
|
|
434
436
|
shouldDisableMonth: PropTypes.func,
|
|
435
437
|
/**
|
|
436
438
|
* Disable specific time.
|
|
437
|
-
* @
|
|
438
|
-
* @param {TDate} value The value to check.
|
|
439
|
+
* @param {PickerValidDate} value The value to check.
|
|
439
440
|
* @param {TimeView} view The clock type of the timeValue.
|
|
440
441
|
* @returns {boolean} If `true` the time will be disabled.
|
|
441
442
|
*/
|
|
442
443
|
shouldDisableTime: PropTypes.func,
|
|
443
444
|
/**
|
|
444
445
|
* Disable specific year.
|
|
445
|
-
* @
|
|
446
|
-
* @param {TDate} year The year to test.
|
|
446
|
+
* @param {PickerValidDate} year The year to test.
|
|
447
447
|
* @returns {boolean} If `true`, the year will be disabled.
|
|
448
448
|
*/
|
|
449
449
|
shouldDisableYear: PropTypes.func,
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
+
import { MakeOptional } from '@mui/x-internals/types';
|
|
1
2
|
import { UseDesktopPickerSlots, ExportedUseDesktopPickerSlotProps, DesktopOnlyPickerProps } from '../internals/hooks/useDesktopPicker';
|
|
2
3
|
import { BaseDateTimePickerProps, BaseDateTimePickerSlots, BaseDateTimePickerSlotProps } from '../DateTimePicker/shared';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { DesktopOnlyTimePickerProps } from '../internals/models/props/clock';
|
|
4
|
+
import { DateOrTimeView } from '../models';
|
|
5
|
+
import { DesktopOnlyTimePickerProps } from '../internals/models/props/time';
|
|
6
6
|
import { DateOrTimeViewWithMeridiem } from '../internals/models';
|
|
7
7
|
import { MultiSectionDigitalClockSlots, MultiSectionDigitalClockSlotProps } from '../MultiSectionDigitalClock';
|
|
8
8
|
import { DigitalClockSlots, DigitalClockSlotProps } from '../DigitalClock';
|
|
9
9
|
import { ExportedYearCalendarProps } from '../YearCalendar/YearCalendar.types';
|
|
10
|
-
export interface DesktopDateTimePickerSlots
|
|
10
|
+
export interface DesktopDateTimePickerSlots extends BaseDateTimePickerSlots, MakeOptional<UseDesktopPickerSlots<DateOrTimeViewWithMeridiem>, 'field' | 'openPickerIcon'>, DigitalClockSlots, MultiSectionDigitalClockSlots {
|
|
11
11
|
}
|
|
12
|
-
export interface DesktopDateTimePickerSlotProps<
|
|
12
|
+
export interface DesktopDateTimePickerSlotProps<TEnableAccessibleFieldDOMStructure extends boolean> extends BaseDateTimePickerSlotProps, ExportedUseDesktopPickerSlotProps<DateOrTimeViewWithMeridiem, TEnableAccessibleFieldDOMStructure>, DigitalClockSlotProps, MultiSectionDigitalClockSlotProps {
|
|
13
13
|
}
|
|
14
|
-
export interface DesktopDateTimePickerProps<
|
|
14
|
+
export interface DesktopDateTimePickerProps<TEnableAccessibleFieldDOMStructure extends boolean = true> extends BaseDateTimePickerProps<DateOrTimeViewWithMeridiem>, DesktopOnlyPickerProps, DesktopOnlyTimePickerProps, ExportedYearCalendarProps {
|
|
15
15
|
/**
|
|
16
16
|
* Overridable component slots.
|
|
17
17
|
* @default {}
|
|
18
18
|
*/
|
|
19
|
-
slots?: DesktopDateTimePickerSlots
|
|
19
|
+
slots?: DesktopDateTimePickerSlots;
|
|
20
20
|
/**
|
|
21
21
|
* The props used for each component slot.
|
|
22
22
|
* @default {}
|
|
23
23
|
*/
|
|
24
|
-
slotProps?: DesktopDateTimePickerSlotProps<
|
|
24
|
+
slotProps?: DesktopDateTimePickerSlotProps<TEnableAccessibleFieldDOMStructure>;
|
|
25
25
|
/**
|
|
26
26
|
* Available views.
|
|
27
27
|
*/
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { PickersLayoutProps } from '../PickersLayout';
|
|
3
|
-
import { PickerValidDate } from '../models';
|
|
4
3
|
import { DateOrTimeViewWithMeridiem } from '../internals/models/common';
|
|
5
|
-
type DesktopDateTimePickerLayoutComponent = (<TValue,
|
|
4
|
+
type DesktopDateTimePickerLayoutComponent = (<TValue, TView extends DateOrTimeViewWithMeridiem>(props: PickersLayoutProps<TValue, TView> & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
|
|
6
5
|
propTypes?: any;
|
|
7
6
|
};
|
|
8
7
|
/**
|
|
@@ -66,6 +66,11 @@ process.env.NODE_ENV !== "production" ? DesktopDateTimePickerLayout.propTypes =
|
|
|
66
66
|
*/
|
|
67
67
|
classes: PropTypes.object,
|
|
68
68
|
className: PropTypes.string,
|
|
69
|
+
/**
|
|
70
|
+
* If `true`, the component is disabled.
|
|
71
|
+
* When disabled, the value cannot be changed and no interaction is possible.
|
|
72
|
+
* @default false
|
|
73
|
+
*/
|
|
69
74
|
disabled: PropTypes.bool,
|
|
70
75
|
isLandscape: PropTypes.bool.isRequired,
|
|
71
76
|
/**
|
|
@@ -87,6 +92,11 @@ process.env.NODE_ENV !== "production" ? DesktopDateTimePickerLayout.propTypes =
|
|
|
87
92
|
* Force rendering in particular orientation.
|
|
88
93
|
*/
|
|
89
94
|
orientation: PropTypes.oneOf(['landscape', 'portrait']),
|
|
95
|
+
/**
|
|
96
|
+
* If `true`, the component is read-only.
|
|
97
|
+
* When read-only, the value cannot be changed but the user can interact with the interface.
|
|
98
|
+
* @default false
|
|
99
|
+
*/
|
|
90
100
|
readOnly: PropTypes.bool,
|
|
91
101
|
/**
|
|
92
102
|
* The props used for each component slot.
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { DesktopTimePickerProps } from './DesktopTimePicker.types';
|
|
3
|
-
|
|
4
|
-
type DesktopTimePickerComponent = (<TDate extends PickerValidDate, TEnableAccessibleFieldDOMStructure extends boolean = false>(props: DesktopTimePickerProps<TDate, TEnableAccessibleFieldDOMStructure> & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
|
|
3
|
+
type DesktopTimePickerComponent = (<TEnableAccessibleFieldDOMStructure extends boolean = true>(props: DesktopTimePickerProps<TEnableAccessibleFieldDOMStructure> & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
|
|
5
4
|
propTypes?: any;
|
|
6
5
|
};
|
|
7
6
|
/**
|
|
@@ -8,7 +8,7 @@ import { refType } from '@mui/utils';
|
|
|
8
8
|
import { singleItemValueManager } from "../internals/utils/valueManagers.js";
|
|
9
9
|
import { TimeField } from "../TimeField/index.js";
|
|
10
10
|
import { useTimePickerDefaultizedProps } from "../TimePicker/shared.js";
|
|
11
|
-
import {
|
|
11
|
+
import { usePickerTranslations } from "../hooks/usePickerTranslations.js";
|
|
12
12
|
import { useUtils } from "../internals/hooks/useUtils.js";
|
|
13
13
|
import { extractValidationProps, validateTime } from "../validation/index.js";
|
|
14
14
|
import { ClockIcon } from "../icons/index.js";
|
|
@@ -28,7 +28,7 @@ import { buildGetOpenDialogAriaText } from "../locales/utils/getPickersLocalizat
|
|
|
28
28
|
* - [DesktopTimePicker API](https://mui.com/x/api/date-pickers/desktop-time-picker/)
|
|
29
29
|
*/
|
|
30
30
|
const DesktopTimePicker = /*#__PURE__*/React.forwardRef(function DesktopTimePicker(inProps, ref) {
|
|
31
|
-
const translations =
|
|
31
|
+
const translations = usePickerTranslations();
|
|
32
32
|
const utils = useUtils();
|
|
33
33
|
|
|
34
34
|
// Props with the default values common to all time pickers
|
|
@@ -127,7 +127,8 @@ DesktopTimePicker.propTypes = {
|
|
|
127
127
|
*/
|
|
128
128
|
defaultValue: PropTypes.object,
|
|
129
129
|
/**
|
|
130
|
-
* If `true`, the
|
|
130
|
+
* If `true`, the component is disabled.
|
|
131
|
+
* When disabled, the value cannot be changed and no interaction is possible.
|
|
131
132
|
* @default false
|
|
132
133
|
*/
|
|
133
134
|
disabled: PropTypes.bool,
|
|
@@ -152,7 +153,7 @@ DesktopTimePicker.propTypes = {
|
|
|
152
153
|
*/
|
|
153
154
|
disablePast: PropTypes.bool,
|
|
154
155
|
/**
|
|
155
|
-
* @default
|
|
156
|
+
* @default true
|
|
156
157
|
*/
|
|
157
158
|
enableAccessibleFieldDOMStructure: PropTypes.any,
|
|
158
159
|
/**
|
|
@@ -260,6 +261,11 @@ DesktopTimePicker.propTypes = {
|
|
|
260
261
|
* Force rendering in particular orientation.
|
|
261
262
|
*/
|
|
262
263
|
orientation: PropTypes.oneOf(['landscape', 'portrait']),
|
|
264
|
+
/**
|
|
265
|
+
* If `true`, the component is read-only.
|
|
266
|
+
* When read-only, the value cannot be changed but the user can interact with the interface.
|
|
267
|
+
* @default false
|
|
268
|
+
*/
|
|
263
269
|
readOnly: PropTypes.bool,
|
|
264
270
|
/**
|
|
265
271
|
* If `true`, disable heavy animations.
|
|
@@ -283,8 +289,7 @@ DesktopTimePicker.propTypes = {
|
|
|
283
289
|
selectedSections: PropTypes.oneOfType([PropTypes.oneOf(['all', 'day', 'empty', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'weekDay', 'year']), PropTypes.number]),
|
|
284
290
|
/**
|
|
285
291
|
* Disable specific time.
|
|
286
|
-
* @
|
|
287
|
-
* @param {TDate} value The value to check.
|
|
292
|
+
* @param {PickerValidDate} value The value to check.
|
|
288
293
|
* @param {TimeView} view The clock type of the timeValue.
|
|
289
294
|
* @returns {boolean} If `true` the time will be disabled.
|
|
290
295
|
*/
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
+
import { MakeOptional } from '@mui/x-internals/types';
|
|
1
2
|
import { UseDesktopPickerSlots, ExportedUseDesktopPickerSlotProps, DesktopOnlyPickerProps } from '../internals/hooks/useDesktopPicker';
|
|
2
3
|
import { BaseTimePickerProps, BaseTimePickerSlots, BaseTimePickerSlotProps } from '../TimePicker/shared';
|
|
3
|
-
import { MakeOptional } from '../internals/models/helpers';
|
|
4
4
|
import { TimeViewWithMeridiem } from '../internals/models';
|
|
5
|
-
import { DesktopOnlyTimePickerProps } from '../internals/models/props/
|
|
5
|
+
import { DesktopOnlyTimePickerProps } from '../internals/models/props/time';
|
|
6
6
|
import { DigitalClockSlots, DigitalClockSlotProps } from '../DigitalClock';
|
|
7
7
|
import { MultiSectionDigitalClockSlots, MultiSectionDigitalClockSlotProps } from '../MultiSectionDigitalClock';
|
|
8
|
-
import {
|
|
9
|
-
export interface DesktopTimePickerSlots
|
|
8
|
+
import { TimeView } from '../models';
|
|
9
|
+
export interface DesktopTimePickerSlots extends BaseTimePickerSlots, MakeOptional<UseDesktopPickerSlots<TimeViewWithMeridiem>, 'field' | 'openPickerIcon'>, DigitalClockSlots, MultiSectionDigitalClockSlots {
|
|
10
10
|
}
|
|
11
|
-
export interface DesktopTimePickerSlotProps<
|
|
11
|
+
export interface DesktopTimePickerSlotProps<TEnableAccessibleFieldDOMStructure extends boolean> extends BaseTimePickerSlotProps, ExportedUseDesktopPickerSlotProps<TimeViewWithMeridiem, TEnableAccessibleFieldDOMStructure>, DigitalClockSlotProps, MultiSectionDigitalClockSlotProps {
|
|
12
12
|
}
|
|
13
|
-
export interface DesktopTimePickerProps<
|
|
13
|
+
export interface DesktopTimePickerProps<TEnableAccessibleFieldDOMStructure extends boolean = true> extends BaseTimePickerProps<TimeViewWithMeridiem>, DesktopOnlyPickerProps, DesktopOnlyTimePickerProps {
|
|
14
14
|
/**
|
|
15
15
|
* Available views.
|
|
16
16
|
*/
|
|
@@ -19,10 +19,10 @@ export interface DesktopTimePickerProps<TDate extends PickerValidDate, TEnableAc
|
|
|
19
19
|
* Overridable component slots.
|
|
20
20
|
* @default {}
|
|
21
21
|
*/
|
|
22
|
-
slots?: DesktopTimePickerSlots
|
|
22
|
+
slots?: DesktopTimePickerSlots;
|
|
23
23
|
/**
|
|
24
24
|
* The props used for each component slot.
|
|
25
25
|
* @default {}
|
|
26
26
|
*/
|
|
27
|
-
slotProps?: DesktopTimePickerSlotProps<
|
|
27
|
+
slotProps?: DesktopTimePickerSlotProps<TEnableAccessibleFieldDOMStructure>;
|
|
28
28
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { DigitalClockProps } from './DigitalClock.types';
|
|
3
|
-
|
|
4
|
-
type DigitalClockComponent = (<TDate extends PickerValidDate>(props: DigitalClockProps<TDate> & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
|
|
3
|
+
type DigitalClockComponent = ((props: DigitalClockProps & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
|
|
5
4
|
propTypes?: any;
|
|
6
5
|
};
|
|
7
6
|
/**
|
|
@@ -13,7 +13,7 @@ import composeClasses from '@mui/utils/composeClasses';
|
|
|
13
13
|
import MenuItem from '@mui/material/MenuItem';
|
|
14
14
|
import MenuList from '@mui/material/MenuList';
|
|
15
15
|
import useForkRef from '@mui/utils/useForkRef';
|
|
16
|
-
import {
|
|
16
|
+
import { usePickerTranslations } from "../hooks/usePickerTranslations.js";
|
|
17
17
|
import { useUtils, useNow } from "../internals/hooks/useUtils.js";
|
|
18
18
|
import { createIsAfterIgnoreDatePart } from "../internals/utils/time-utils.js";
|
|
19
19
|
import { PickerViewRoot } from "../internals/components/PickerViewRoot/index.js";
|
|
@@ -152,7 +152,7 @@ export const DigitalClock = /*#__PURE__*/React.forwardRef(function DigitalClock(
|
|
|
152
152
|
onChange,
|
|
153
153
|
valueManager: singleItemValueManager
|
|
154
154
|
});
|
|
155
|
-
const translations =
|
|
155
|
+
const translations = usePickerTranslations();
|
|
156
156
|
const now = useNow(timezone);
|
|
157
157
|
const ownerState = React.useMemo(() => _extends({}, props, {
|
|
158
158
|
alreadyRendered: !!containerRef.current
|
|
@@ -335,7 +335,8 @@ process.env.NODE_ENV !== "production" ? DigitalClock.propTypes = {
|
|
|
335
335
|
*/
|
|
336
336
|
defaultValue: PropTypes.object,
|
|
337
337
|
/**
|
|
338
|
-
* If `true`, the
|
|
338
|
+
* If `true`, the component is disabled.
|
|
339
|
+
* When disabled, the value cannot be changed and no interaction is possible.
|
|
339
340
|
* @default false
|
|
340
341
|
*/
|
|
341
342
|
disabled: PropTypes.bool,
|
|
@@ -402,7 +403,8 @@ process.env.NODE_ENV !== "production" ? DigitalClock.propTypes = {
|
|
|
402
403
|
*/
|
|
403
404
|
openTo: PropTypes.oneOf(['hours']),
|
|
404
405
|
/**
|
|
405
|
-
* If `true`, the
|
|
406
|
+
* If `true`, the component is read-only.
|
|
407
|
+
* When read-only, the value cannot be changed but the user can interact with the interface.
|
|
406
408
|
* @default false
|
|
407
409
|
*/
|
|
408
410
|
readOnly: PropTypes.bool,
|
|
@@ -413,8 +415,7 @@ process.env.NODE_ENV !== "production" ? DigitalClock.propTypes = {
|
|
|
413
415
|
referenceDate: PropTypes.object,
|
|
414
416
|
/**
|
|
415
417
|
* Disable specific time.
|
|
416
|
-
* @
|
|
417
|
-
* @param {TDate} value The value to check.
|
|
418
|
+
* @param {PickerValidDate} value The value to check.
|
|
418
419
|
* @param {TimeView} view The clock type of the timeValue.
|
|
419
420
|
* @returns {boolean} If `true` the time will be disabled.
|
|
420
421
|
*/
|