@mui/x-date-pickers 6.16.1 → 6.16.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/AdapterDayjs/AdapterDayjs.js +6 -4
- package/AdapterMoment/AdapterMoment.js +2 -5
- package/CHANGELOG.md +169 -0
- package/DateField/DateField.d.ts +10 -0
- package/DateField/DateField.js +11 -1
- package/DatePicker/DatePicker.d.ts +10 -0
- package/DatePicker/DatePicker.js +10 -0
- package/DatePicker/DatePickerToolbar.d.ts +10 -0
- package/DatePicker/DatePickerToolbar.js +10 -0
- package/DateTimeField/DateTimeField.d.ts +10 -0
- package/DateTimeField/DateTimeField.js +11 -1
- package/DateTimePicker/DateTimePicker.d.ts +10 -0
- package/DateTimePicker/DateTimePicker.js +15 -0
- package/DateTimePicker/DateTimePickerTabs.d.ts +10 -0
- package/DateTimePicker/DateTimePickerTabs.js +11 -0
- package/DateTimePicker/DateTimePickerToolbar.d.ts +10 -0
- package/DateTimePicker/DateTimePickerToolbar.js +11 -0
- package/DayCalendarSkeleton/DayCalendarSkeleton.d.ts +1 -2
- package/DayCalendarSkeleton/DayCalendarSkeleton.js +1 -2
- package/DesktopDatePicker/DesktopDatePicker.d.ts +10 -0
- package/DesktopDatePicker/DesktopDatePicker.js +10 -0
- package/DesktopDateTimePicker/DesktopDateTimePicker.d.ts +10 -0
- package/DesktopDateTimePicker/DesktopDateTimePicker.js +25 -7
- package/DesktopDateTimePicker/DesktopDateTimePicker.types.d.ts +4 -3
- package/DesktopTimePicker/DesktopTimePicker.d.ts +10 -0
- package/DesktopTimePicker/DesktopTimePicker.js +18 -9
- package/DigitalClock/DigitalClock.d.ts +10 -0
- package/DigitalClock/DigitalClock.js +11 -1
- package/LocalizationProvider/LocalizationProvider.d.ts +12 -0
- package/LocalizationProvider/LocalizationProvider.js +12 -0
- package/MobileDatePicker/MobileDatePicker.d.ts +10 -0
- package/MobileDatePicker/MobileDatePicker.js +10 -0
- package/MobileDateTimePicker/MobileDateTimePicker.d.ts +10 -0
- package/MobileDateTimePicker/MobileDateTimePicker.js +10 -0
- package/MobileTimePicker/MobileTimePicker.d.ts +10 -0
- package/MobileTimePicker/MobileTimePicker.js +10 -0
- package/MultiSectionDigitalClock/MultiSectionDigitalClock.d.ts +10 -0
- package/MultiSectionDigitalClock/MultiSectionDigitalClock.js +10 -0
- package/PickersActionBar/PickersActionBar.d.ts +10 -0
- package/PickersActionBar/PickersActionBar.js +10 -0
- package/PickersCalendarHeader/PickersCalendarHeader.d.ts +11 -0
- package/PickersCalendarHeader/PickersCalendarHeader.js +11 -0
- package/PickersDay/PickersDay.d.ts +1 -3
- package/PickersDay/PickersDay.js +1 -3
- package/PickersLayout/PickersLayout.d.ts +9 -0
- package/PickersLayout/PickersLayout.js +10 -0
- package/PickersShortcuts/PickersShortcuts.d.ts +9 -0
- package/PickersShortcuts/PickersShortcuts.js +9 -0
- package/StaticDatePicker/StaticDatePicker.d.ts +10 -0
- package/StaticDatePicker/StaticDatePicker.js +10 -0
- package/StaticDateTimePicker/StaticDateTimePicker.d.ts +10 -0
- package/StaticDateTimePicker/StaticDateTimePicker.js +10 -0
- package/StaticTimePicker/StaticTimePicker.d.ts +10 -0
- package/StaticTimePicker/StaticTimePicker.js +10 -0
- package/TimeClock/TimeClock.d.ts +4 -0
- package/TimeClock/TimeClock.js +4 -0
- package/TimeField/TimeField.d.ts +10 -0
- package/TimeField/TimeField.js +11 -1
- package/TimePicker/TimePicker.d.ts +10 -0
- package/TimePicker/TimePicker.js +10 -0
- package/TimePicker/TimePickerToolbar.d.ts +10 -0
- package/TimePicker/TimePickerToolbar.js +11 -0
- package/dateTimeViewRenderers/dateTimeViewRenderers.d.ts +2 -1
- package/dateTimeViewRenderers/dateTimeViewRenderers.js +52 -33
- package/index.js +1 -1
- package/internals/components/FakeTextField/FakeTextField.d.ts +10 -0
- package/internals/components/FakeTextField/FakeTextField.js +27 -0
- package/internals/components/FakeTextField/index.d.ts +1 -0
- package/internals/components/FakeTextField/index.js +1 -0
- package/internals/hooks/useField/useField.js +14 -4
- package/internals/hooks/useField/useField.utils.js +1 -1
- package/internals/hooks/useField/useFieldState.js +5 -8
- package/internals/utils/date-time-utils.d.ts +11 -0
- package/internals/utils/date-time-utils.js +32 -2
- package/legacy/AdapterDayjs/AdapterDayjs.js +6 -4
- package/legacy/AdapterMoment/AdapterMoment.js +2 -5
- package/legacy/DateField/DateField.js +11 -1
- package/legacy/DatePicker/DatePicker.js +10 -0
- package/legacy/DatePicker/DatePickerToolbar.js +10 -0
- package/legacy/DateTimeField/DateTimeField.js +11 -1
- package/legacy/DateTimePicker/DateTimePicker.js +15 -0
- package/legacy/DateTimePicker/DateTimePickerTabs.js +11 -0
- package/legacy/DateTimePicker/DateTimePickerToolbar.js +11 -0
- package/legacy/DayCalendarSkeleton/DayCalendarSkeleton.js +1 -2
- package/legacy/DesktopDatePicker/DesktopDatePicker.js +10 -0
- package/legacy/DesktopDateTimePicker/DesktopDateTimePicker.js +24 -8
- package/legacy/DesktopTimePicker/DesktopTimePicker.js +19 -10
- package/legacy/DigitalClock/DigitalClock.js +11 -1
- package/legacy/LocalizationProvider/LocalizationProvider.js +12 -0
- package/legacy/MobileDatePicker/MobileDatePicker.js +10 -0
- package/legacy/MobileDateTimePicker/MobileDateTimePicker.js +10 -0
- package/legacy/MobileTimePicker/MobileTimePicker.js +10 -0
- package/legacy/MultiSectionDigitalClock/MultiSectionDigitalClock.js +10 -0
- package/legacy/PickersActionBar/PickersActionBar.js +10 -0
- package/legacy/PickersCalendarHeader/PickersCalendarHeader.js +11 -0
- package/legacy/PickersDay/PickersDay.js +1 -3
- package/legacy/PickersLayout/PickersLayout.js +10 -0
- package/legacy/PickersShortcuts/PickersShortcuts.js +9 -0
- package/legacy/StaticDatePicker/StaticDatePicker.js +10 -0
- package/legacy/StaticDateTimePicker/StaticDateTimePicker.js +10 -0
- package/legacy/StaticTimePicker/StaticTimePicker.js +10 -0
- package/legacy/TimeClock/TimeClock.js +4 -0
- package/legacy/TimeField/TimeField.js +11 -1
- package/legacy/TimePicker/TimePicker.js +10 -0
- package/legacy/TimePicker/TimePickerToolbar.js +11 -0
- package/legacy/dateTimeViewRenderers/dateTimeViewRenderers.js +51 -33
- package/legacy/index.js +1 -1
- package/legacy/internals/components/FakeTextField/FakeTextField.js +23 -0
- package/legacy/internals/components/FakeTextField/index.js +1 -0
- package/legacy/internals/hooks/useField/useField.js +14 -4
- package/legacy/internals/hooks/useField/useField.utils.js +1 -1
- package/legacy/internals/hooks/useField/useFieldState.js +5 -8
- package/legacy/internals/utils/date-time-utils.js +34 -2
- package/legacy/locales/esES.js +1 -1
- package/locales/esES.js +1 -1
- package/modern/AdapterDayjs/AdapterDayjs.js +6 -4
- package/modern/AdapterMoment/AdapterMoment.js +2 -5
- package/modern/DateField/DateField.js +11 -1
- package/modern/DatePicker/DatePicker.js +10 -0
- package/modern/DatePicker/DatePickerToolbar.js +10 -0
- package/modern/DateTimeField/DateTimeField.js +11 -1
- package/modern/DateTimePicker/DateTimePicker.js +15 -0
- package/modern/DateTimePicker/DateTimePickerTabs.js +11 -0
- package/modern/DateTimePicker/DateTimePickerToolbar.js +11 -0
- package/modern/DayCalendarSkeleton/DayCalendarSkeleton.js +1 -2
- package/modern/DesktopDatePicker/DesktopDatePicker.js +10 -0
- package/modern/DesktopDateTimePicker/DesktopDateTimePicker.js +25 -7
- package/modern/DesktopTimePicker/DesktopTimePicker.js +17 -8
- package/modern/DigitalClock/DigitalClock.js +11 -1
- package/modern/LocalizationProvider/LocalizationProvider.js +12 -0
- package/modern/MobileDatePicker/MobileDatePicker.js +10 -0
- package/modern/MobileDateTimePicker/MobileDateTimePicker.js +10 -0
- package/modern/MobileTimePicker/MobileTimePicker.js +10 -0
- package/modern/MultiSectionDigitalClock/MultiSectionDigitalClock.js +10 -0
- package/modern/PickersActionBar/PickersActionBar.js +10 -0
- package/modern/PickersCalendarHeader/PickersCalendarHeader.js +11 -0
- package/modern/PickersDay/PickersDay.js +1 -3
- package/modern/PickersLayout/PickersLayout.js +10 -0
- package/modern/PickersShortcuts/PickersShortcuts.js +9 -0
- package/modern/StaticDatePicker/StaticDatePicker.js +10 -0
- package/modern/StaticDateTimePicker/StaticDateTimePicker.js +10 -0
- package/modern/StaticTimePicker/StaticTimePicker.js +10 -0
- package/modern/TimeClock/TimeClock.js +4 -0
- package/modern/TimeField/TimeField.js +11 -1
- package/modern/TimePicker/TimePicker.js +10 -0
- package/modern/TimePicker/TimePickerToolbar.js +11 -0
- package/modern/dateTimeViewRenderers/dateTimeViewRenderers.js +52 -33
- package/modern/index.js +1 -1
- package/modern/internals/components/FakeTextField/FakeTextField.js +27 -0
- package/modern/internals/components/FakeTextField/index.js +1 -0
- package/modern/internals/hooks/useField/useField.js +14 -4
- package/modern/internals/hooks/useField/useField.utils.js +1 -1
- package/modern/internals/hooks/useField/useFieldState.js +5 -8
- package/modern/internals/utils/date-time-utils.js +29 -2
- package/modern/locales/esES.js +1 -1
- package/node/AdapterDayjs/AdapterDayjs.js +6 -4
- package/node/AdapterMoment/AdapterMoment.js +2 -5
- package/node/DateCalendar/DateCalendar.js +2 -2
- package/node/DateCalendar/DayCalendar.js +2 -2
- package/node/DateCalendar/PickersFadeTransitionGroup.js +2 -2
- package/node/DateCalendar/PickersSlideTransition.js +2 -2
- package/node/DateCalendar/useCalendarState.js +2 -2
- package/node/DateCalendar/useIsDateDisabled.js +2 -2
- package/node/DateField/DateField.js +13 -3
- package/node/DatePicker/DatePicker.js +12 -2
- package/node/DatePicker/DatePickerToolbar.js +12 -2
- package/node/DatePicker/shared.js +2 -2
- package/node/DateTimeField/DateTimeField.js +13 -3
- package/node/DateTimePicker/DateTimePicker.js +17 -2
- package/node/DateTimePicker/DateTimePickerTabs.js +13 -2
- package/node/DateTimePicker/DateTimePickerToolbar.js +13 -2
- package/node/DateTimePicker/shared.js +2 -2
- package/node/DayCalendarSkeleton/DayCalendarSkeleton.js +3 -4
- package/node/DesktopDatePicker/DesktopDatePicker.js +12 -2
- package/node/DesktopDateTimePicker/DesktopDateTimePicker.js +26 -8
- package/node/DesktopTimePicker/DesktopTimePicker.js +19 -10
- package/node/DigitalClock/DigitalClock.js +13 -3
- package/node/LocalizationProvider/LocalizationProvider.js +14 -2
- package/node/MobileDatePicker/MobileDatePicker.js +12 -2
- package/node/MobileDateTimePicker/MobileDateTimePicker.js +12 -2
- package/node/MobileTimePicker/MobileTimePicker.js +12 -2
- package/node/MonthCalendar/MonthCalendar.js +2 -2
- package/node/MonthCalendar/PickersMonth.js +2 -2
- package/node/MultiSectionDigitalClock/MultiSectionDigitalClock.js +12 -2
- package/node/MultiSectionDigitalClock/MultiSectionDigitalClockSection.js +2 -2
- package/node/PickersActionBar/PickersActionBar.js +12 -2
- package/node/PickersCalendarHeader/PickersCalendarHeader.js +13 -2
- package/node/PickersDay/PickersDay.js +3 -5
- package/node/PickersLayout/PickersLayout.js +12 -2
- package/node/PickersLayout/usePickerLayout.js +2 -2
- package/node/PickersShortcuts/PickersShortcuts.js +11 -2
- package/node/StaticDatePicker/StaticDatePicker.js +12 -2
- package/node/StaticDateTimePicker/StaticDateTimePicker.js +12 -2
- package/node/StaticTimePicker/StaticTimePicker.js +12 -2
- package/node/TimeClock/Clock.js +2 -2
- package/node/TimeClock/ClockNumber.js +2 -2
- package/node/TimeClock/ClockNumbers.js +2 -2
- package/node/TimeClock/ClockPointer.js +2 -2
- package/node/TimeClock/TimeClock.js +6 -2
- package/node/TimeField/TimeField.js +13 -3
- package/node/TimePicker/TimePicker.js +12 -2
- package/node/TimePicker/TimePickerToolbar.js +13 -2
- package/node/TimePicker/shared.js +2 -2
- package/node/YearCalendar/PickersYear.js +2 -2
- package/node/YearCalendar/YearCalendar.js +2 -2
- package/node/dateTimeViewRenderers/dateTimeViewRenderers.js +53 -34
- package/node/dateViewRenderers/dateViewRenderers.js +2 -2
- package/node/hooks/useClearableField.js +2 -2
- package/node/icons/index.js +2 -2
- package/node/index.js +1 -1
- package/node/internals/components/FakeTextField/FakeTextField.js +35 -0
- package/node/internals/components/FakeTextField/index.js +12 -0
- package/node/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.js +2 -2
- package/node/internals/components/PickersModalDialog.js +2 -2
- package/node/internals/components/PickersPopper.js +2 -2
- package/node/internals/components/PickersToolbar.js +2 -2
- package/node/internals/components/PickersToolbarButton.js +2 -2
- package/node/internals/components/PickersToolbarText.js +2 -2
- package/node/internals/demo/DemoContainer.js +2 -2
- package/node/internals/hooks/date-helpers-hooks.js +2 -2
- package/node/internals/hooks/useClockReferenceDate.js +2 -2
- package/node/internals/hooks/useDesktopPicker/useDesktopPicker.js +2 -2
- package/node/internals/hooks/useField/useField.js +16 -6
- package/node/internals/hooks/useField/useField.utils.js +1 -1
- package/node/internals/hooks/useField/useFieldCharacterEditing.js +2 -2
- package/node/internals/hooks/useField/useFieldState.js +7 -10
- package/node/internals/hooks/useIsLandscape.js +2 -2
- package/node/internals/hooks/useMobilePicker/useMobilePicker.js +2 -2
- package/node/internals/hooks/useOpenState.js +2 -2
- package/node/internals/hooks/usePicker/usePickerValue.js +2 -2
- package/node/internals/hooks/usePicker/usePickerViews.js +2 -2
- package/node/internals/hooks/useStaticPicker/useStaticPicker.js +2 -2
- package/node/internals/hooks/useUtils.js +2 -2
- package/node/internals/hooks/useValidation.js +2 -2
- package/node/internals/hooks/useValueWithTimezone.js +2 -2
- package/node/internals/hooks/useViews.js +2 -2
- package/node/internals/utils/date-time-utils.js +29 -1
- package/node/locales/esES.js +1 -1
- package/node/timeViewRenderers/timeViewRenderers.js +2 -2
- package/package.json +4 -4
|
@@ -94,6 +94,17 @@ const PickersCalendarHeaderSwitchViewIcon = styled(ArrowDropDownIcon, {
|
|
|
94
94
|
transition: theme.transitions.create('transform'),
|
|
95
95
|
transform: 'rotate(0deg)'
|
|
96
96
|
}));
|
|
97
|
+
/**
|
|
98
|
+
* Demos:
|
|
99
|
+
*
|
|
100
|
+
* - [DateCalendar](https://mui.com/x/react-date-pickers/date-calendar/)
|
|
101
|
+
* - [DateRangeCalendar](https://mui.com/x/react-date-pickers/date-range-calendar/)
|
|
102
|
+
* - [Custom slots and subcomponents](https://mui.com/x/react-date-pickers/custom-components/)
|
|
103
|
+
*
|
|
104
|
+
* API:
|
|
105
|
+
*
|
|
106
|
+
* - [PickersCalendarHeader API](https://mui.com/x/api/date-pickers/pickers-calendar-header/)
|
|
107
|
+
*/
|
|
97
108
|
const PickersCalendarHeader = /*#__PURE__*/React.forwardRef(function PickersCalendarHeader(inProps, ref) {
|
|
98
109
|
const localeText = useLocaleText();
|
|
99
110
|
const utils = useUtils();
|
|
@@ -343,11 +343,9 @@ process.env.NODE_ENV !== "production" ? PickersDayRaw.propTypes = {
|
|
|
343
343
|
} : void 0;
|
|
344
344
|
|
|
345
345
|
/**
|
|
346
|
-
*
|
|
347
346
|
* Demos:
|
|
348
347
|
*
|
|
349
|
-
* - [
|
|
350
|
-
*
|
|
348
|
+
* - [DateCalendar](https://mui.com/x/react-date-pickers/date-calendar/)
|
|
351
349
|
* API:
|
|
352
350
|
*
|
|
353
351
|
* - [PickersDay API](https://mui.com/x/api/date-pickers/pickers-day/)
|
|
@@ -70,6 +70,16 @@ export const PickersLayoutContentWrapper = styled('div', {
|
|
|
70
70
|
display: 'flex',
|
|
71
71
|
flexDirection: 'column'
|
|
72
72
|
});
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Demos:
|
|
76
|
+
*
|
|
77
|
+
* - [Custom layout](https://mui.com/x/react-date-pickers/custom-layout/)
|
|
78
|
+
*
|
|
79
|
+
* API:
|
|
80
|
+
*
|
|
81
|
+
* - [PickersLayout API](https://mui.com/x/api/date-pickers/pickers-layout/)
|
|
82
|
+
*/
|
|
73
83
|
const PickersLayout = function PickersLayout(inProps) {
|
|
74
84
|
const props = useThemeProps({
|
|
75
85
|
props: inProps,
|
|
@@ -9,6 +9,15 @@ import ListItem from '@mui/material/ListItem';
|
|
|
9
9
|
import Chip from '@mui/material/Chip';
|
|
10
10
|
import { VIEW_HEIGHT } from '../internals/constants/dimensions';
|
|
11
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
|
+
/**
|
|
13
|
+
* Demos:
|
|
14
|
+
*
|
|
15
|
+
* - [Shortcuts](https://mui.com/x/react-date-pickers/shortcuts/)
|
|
16
|
+
*
|
|
17
|
+
* API:
|
|
18
|
+
*
|
|
19
|
+
* - [PickersShortcuts API](https://mui.com/x/api/date-pickers/pickers-shortcuts/)
|
|
20
|
+
*/
|
|
12
21
|
function PickersShortcuts(props) {
|
|
13
22
|
const {
|
|
14
23
|
items,
|
|
@@ -6,6 +6,16 @@ import { renderDateViewCalendar } from '../dateViewRenderers';
|
|
|
6
6
|
import { useStaticPicker } from '../internals/hooks/useStaticPicker';
|
|
7
7
|
import { validateDate } from '../internals';
|
|
8
8
|
import { singleItemValueManager } from '../internals/utils/valueManagers';
|
|
9
|
+
/**
|
|
10
|
+
* Demos:
|
|
11
|
+
*
|
|
12
|
+
* - [DatePicker](https://mui.com/x/react-date-pickers/date-picker/)
|
|
13
|
+
* - [Validation](https://mui.com/x/react-date-pickers/validation/)
|
|
14
|
+
*
|
|
15
|
+
* API:
|
|
16
|
+
*
|
|
17
|
+
* - [StaticDatePicker API](https://mui.com/x/api/date-pickers/static-date-picker/)
|
|
18
|
+
*/
|
|
9
19
|
const StaticDatePicker = /*#__PURE__*/React.forwardRef(function StaticDatePicker(inProps, ref) {
|
|
10
20
|
const defaultizedProps = useDatePickerDefaultizedProps(inProps, 'MuiStaticDatePicker');
|
|
11
21
|
const displayStaticWrapperAs = defaultizedProps.displayStaticWrapperAs ?? 'mobile';
|
|
@@ -7,6 +7,16 @@ import { renderDateViewCalendar } from '../dateViewRenderers';
|
|
|
7
7
|
import { singleItemValueManager } from '../internals/utils/valueManagers';
|
|
8
8
|
import { useStaticPicker } from '../internals/hooks/useStaticPicker';
|
|
9
9
|
import { validateDateTime } from '../internals/utils/validation/validateDateTime';
|
|
10
|
+
/**
|
|
11
|
+
* Demos:
|
|
12
|
+
*
|
|
13
|
+
* - [DateTimePicker](https://mui.com/x/react-date-pickers/date-time-picker/)
|
|
14
|
+
* - [Validation](https://mui.com/x/react-date-pickers/validation/)
|
|
15
|
+
*
|
|
16
|
+
* API:
|
|
17
|
+
*
|
|
18
|
+
* - [StaticDateTimePicker API](https://mui.com/x/api/date-pickers/static-date-time-picker/)
|
|
19
|
+
*/
|
|
10
20
|
const StaticDateTimePicker = /*#__PURE__*/React.forwardRef(function StaticDateTimePicker(inProps, ref) {
|
|
11
21
|
const defaultizedProps = useDateTimePickerDefaultizedProps(inProps, 'MuiStaticDateTimePicker');
|
|
12
22
|
const displayStaticWrapperAs = defaultizedProps.displayStaticWrapperAs ?? 'mobile';
|
|
@@ -6,6 +6,16 @@ import { renderTimeViewClock } from '../timeViewRenderers';
|
|
|
6
6
|
import { singleItemValueManager } from '../internals/utils/valueManagers';
|
|
7
7
|
import { useStaticPicker } from '../internals/hooks/useStaticPicker';
|
|
8
8
|
import { validateTime } from '../internals/utils/validation/validateTime';
|
|
9
|
+
/**
|
|
10
|
+
* Demos:
|
|
11
|
+
*
|
|
12
|
+
* - [TimePicker](https://mui.com/x/react-date-pickers/time-picker/)
|
|
13
|
+
* - [Validation](https://mui.com/x/react-date-pickers/validation/)
|
|
14
|
+
*
|
|
15
|
+
* API:
|
|
16
|
+
*
|
|
17
|
+
* - [StaticTimePicker API](https://mui.com/x/api/date-pickers/static-time-picker/)
|
|
18
|
+
*/
|
|
9
19
|
const StaticTimePicker = /*#__PURE__*/React.forwardRef(function StaticTimePicker(inProps, ref) {
|
|
10
20
|
const defaultizedProps = useTimePickerDefaultizedProps(inProps, 'MuiStaticTimePicker');
|
|
11
21
|
const displayStaticWrapperAs = defaultizedProps.displayStaticWrapperAs ?? 'mobile';
|
|
@@ -52,6 +52,10 @@ const TimeClockArrowSwitcher = styled(PickersArrowSwitcher, {
|
|
|
52
52
|
const TIME_CLOCK_DEFAULT_VIEWS = ['hours', 'minutes'];
|
|
53
53
|
|
|
54
54
|
/**
|
|
55
|
+
* Demos:
|
|
56
|
+
*
|
|
57
|
+
* - [TimePicker](https://mui.com/x/react-date-pickers/time-picker/)
|
|
58
|
+
* - [TimeClock](https://mui.com/x/react-date-pickers/time-clock/)
|
|
55
59
|
*
|
|
56
60
|
* API:
|
|
57
61
|
*
|
|
@@ -12,6 +12,16 @@ import { refType } from '@mui/utils';
|
|
|
12
12
|
import { useTimeField } from './useTimeField';
|
|
13
13
|
import { useClearableField } from '../hooks';
|
|
14
14
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
|
+
/**
|
|
16
|
+
* Demos:
|
|
17
|
+
*
|
|
18
|
+
* - [TimeField](http://mui.com/x/react-date-pickers/time-field/)
|
|
19
|
+
* - [Fields](https://mui.com/x/react-date-pickers/fields/)
|
|
20
|
+
*
|
|
21
|
+
* API:
|
|
22
|
+
*
|
|
23
|
+
* - [TimeField API](https://mui.com/x/api/date-pickers/time-field/)
|
|
24
|
+
*/
|
|
15
25
|
const TimeField = /*#__PURE__*/React.forwardRef(function TimeField(inProps, ref) {
|
|
16
26
|
const themeProps = useThemeProps({
|
|
17
27
|
props: inProps,
|
|
@@ -107,7 +117,7 @@ process.env.NODE_ENV !== "production" ? TimeField.propTypes = {
|
|
|
107
117
|
/**
|
|
108
118
|
* The color of the component.
|
|
109
119
|
* It supports both default and custom theme colors, which can be added as shown in the
|
|
110
|
-
* [palette customization guide](https://mui.com/material-ui/customization/palette/#
|
|
120
|
+
* [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
|
|
111
121
|
* @default 'primary'
|
|
112
122
|
*/
|
|
113
123
|
color: PropTypes.oneOf(['error', 'info', 'primary', 'secondary', 'success', 'warning']),
|
|
@@ -10,6 +10,16 @@ import { DesktopTimePicker } from '../DesktopTimePicker';
|
|
|
10
10
|
import { MobileTimePicker } from '../MobileTimePicker';
|
|
11
11
|
import { DEFAULT_DESKTOP_MODE_MEDIA_QUERY } from '../internals/utils/utils';
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
/**
|
|
14
|
+
* Demos:
|
|
15
|
+
*
|
|
16
|
+
* - [TimePicker](https://mui.com/x/react-date-pickers/time-picker/)
|
|
17
|
+
* - [Validation](https://mui.com/x/react-date-pickers/validation/)
|
|
18
|
+
*
|
|
19
|
+
* API:
|
|
20
|
+
*
|
|
21
|
+
* - [TimePicker API](https://mui.com/x/api/date-pickers/time-picker/)
|
|
22
|
+
*/
|
|
13
23
|
const TimePicker = /*#__PURE__*/React.forwardRef(function TimePicker(inProps, ref) {
|
|
14
24
|
const props = useThemeProps({
|
|
15
25
|
props: inProps,
|
|
@@ -106,6 +106,17 @@ TimePickerToolbarAmPmSelection.propTypes = {
|
|
|
106
106
|
ownerState: PropTypes.object.isRequired,
|
|
107
107
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
|
|
108
108
|
};
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Demos:
|
|
112
|
+
*
|
|
113
|
+
* - [TimePicker](https://mui.com/x/react-date-pickers/time-picker/)
|
|
114
|
+
* - [Custom components](https://mui.com/x/react-date-pickers/custom-components/)
|
|
115
|
+
*
|
|
116
|
+
* API:
|
|
117
|
+
*
|
|
118
|
+
* - [TimePickerToolbar API](https://mui.com/x/api/date-pickers/time-picker-toolbar/)
|
|
119
|
+
*/
|
|
109
120
|
function TimePickerToolbar(inProps) {
|
|
110
121
|
const props = useThemeProps({
|
|
111
122
|
props: inProps,
|
|
@@ -3,10 +3,13 @@ import * as React from 'react';
|
|
|
3
3
|
import Divider from '@mui/material/Divider';
|
|
4
4
|
import { resolveComponentProps } from '@mui/base/utils';
|
|
5
5
|
import { DateCalendar } from '../DateCalendar';
|
|
6
|
-
import {
|
|
6
|
+
import { multiSectionDigitalClockSectionClasses } from '../MultiSectionDigitalClock';
|
|
7
7
|
import { DateTimeViewWrapper } from '../internals/components/DateTimeViewWrapper';
|
|
8
8
|
import { isInternalTimeView } from '../internals/utils/time-utils';
|
|
9
9
|
import { isDatePickerView } from '../internals/utils/date-utils';
|
|
10
|
+
import { renderDigitalClockTimeView, renderMultiSectionDigitalClockTimeView } from '../timeViewRenderers';
|
|
11
|
+
import { digitalClockClasses } from '../DigitalClock';
|
|
12
|
+
import { VIEW_HEIGHT } from '../internals/constants/dimensions';
|
|
10
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
14
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
15
|
export const renderDesktopDateTimeView = ({
|
|
@@ -59,9 +62,42 @@ export const renderDesktopDateTimeView = ({
|
|
|
59
62
|
disableIgnoringDatePartForTimeValidation,
|
|
60
63
|
timeSteps,
|
|
61
64
|
skipDisabled,
|
|
62
|
-
timeViewsCount
|
|
65
|
+
timeViewsCount,
|
|
66
|
+
shouldRenderTimeInASingleColumn
|
|
63
67
|
}) => {
|
|
64
68
|
const isActionBarVisible = !!resolveComponentProps(slotProps?.actionBar ?? componentsProps?.actionBar, {})?.actions?.length;
|
|
69
|
+
const commonTimeProps = {
|
|
70
|
+
view: isInternalTimeView(view) ? view : 'hours',
|
|
71
|
+
onViewChange,
|
|
72
|
+
focusedView: focusedView && isInternalTimeView(focusedView) ? focusedView : null,
|
|
73
|
+
onFocusedViewChange,
|
|
74
|
+
views: views.filter(isInternalTimeView),
|
|
75
|
+
value,
|
|
76
|
+
defaultValue,
|
|
77
|
+
referenceDate,
|
|
78
|
+
onChange,
|
|
79
|
+
className,
|
|
80
|
+
classes,
|
|
81
|
+
disableFuture,
|
|
82
|
+
disablePast,
|
|
83
|
+
minTime,
|
|
84
|
+
maxTime,
|
|
85
|
+
shouldDisableTime,
|
|
86
|
+
shouldDisableClock,
|
|
87
|
+
minutesStep,
|
|
88
|
+
ampm,
|
|
89
|
+
components,
|
|
90
|
+
componentsProps,
|
|
91
|
+
slots,
|
|
92
|
+
slotProps,
|
|
93
|
+
readOnly,
|
|
94
|
+
disabled,
|
|
95
|
+
autoFocus,
|
|
96
|
+
disableIgnoringDatePartForTimeValidation,
|
|
97
|
+
timeSteps,
|
|
98
|
+
skipDisabled,
|
|
99
|
+
timezone
|
|
100
|
+
};
|
|
65
101
|
return /*#__PURE__*/_jsxs(React.Fragment, {
|
|
66
102
|
children: [/*#__PURE__*/_jsxs(DateTimeViewWrapper, {
|
|
67
103
|
children: [/*#__PURE__*/_jsx(DateCalendar, {
|
|
@@ -108,45 +144,28 @@ export const renderDesktopDateTimeView = ({
|
|
|
108
144
|
}), timeViewsCount > 0 && /*#__PURE__*/_jsxs(React.Fragment, {
|
|
109
145
|
children: [/*#__PURE__*/_jsx(Divider, {
|
|
110
146
|
orientation: "vertical"
|
|
111
|
-
}),
|
|
147
|
+
}), shouldRenderTimeInASingleColumn ? renderDigitalClockTimeView(_extends({}, commonTimeProps, {
|
|
148
|
+
view: 'hours',
|
|
149
|
+
views: ['hours'],
|
|
150
|
+
focusedView: focusedView && isInternalTimeView(focusedView) ? 'hours' : null,
|
|
151
|
+
sx: _extends({
|
|
152
|
+
width: 'auto',
|
|
153
|
+
[`&.${digitalClockClasses.root}`]: {
|
|
154
|
+
maxHeight: VIEW_HEIGHT
|
|
155
|
+
}
|
|
156
|
+
}, Array.isArray(sx) ? sx : [sx])
|
|
157
|
+
})) : renderMultiSectionDigitalClockTimeView(_extends({}, commonTimeProps, {
|
|
112
158
|
view: isInternalTimeView(view) ? view : 'hours',
|
|
113
|
-
onViewChange: onViewChange,
|
|
114
|
-
focusedView: focusedView && isInternalTimeView(focusedView) ? focusedView : null,
|
|
115
|
-
onFocusedViewChange: onFocusedViewChange,
|
|
116
159
|
views: views.filter(isInternalTimeView),
|
|
117
|
-
|
|
118
|
-
defaultValue: defaultValue,
|
|
119
|
-
referenceDate: referenceDate,
|
|
120
|
-
onChange: onChange,
|
|
121
|
-
className: className,
|
|
122
|
-
classes: classes,
|
|
123
|
-
disableFuture: disableFuture,
|
|
124
|
-
disablePast: disablePast,
|
|
125
|
-
minTime: minTime,
|
|
126
|
-
maxTime: maxTime,
|
|
127
|
-
shouldDisableTime: shouldDisableTime,
|
|
128
|
-
shouldDisableClock: shouldDisableClock,
|
|
129
|
-
minutesStep: minutesStep,
|
|
130
|
-
ampm: ampm,
|
|
131
|
-
components: components,
|
|
132
|
-
componentsProps: componentsProps,
|
|
133
|
-
slots: slots,
|
|
134
|
-
slotProps: slotProps,
|
|
135
|
-
readOnly: readOnly,
|
|
136
|
-
disabled: disabled,
|
|
160
|
+
focusedView: focusedView && isInternalTimeView(focusedView) ? focusedView : null,
|
|
137
161
|
sx: _extends({
|
|
138
162
|
borderBottom: 0,
|
|
139
163
|
width: 'auto',
|
|
140
164
|
[`.${multiSectionDigitalClockSectionClasses.root}`]: {
|
|
141
165
|
maxHeight: '100%'
|
|
142
166
|
}
|
|
143
|
-
}, Array.isArray(sx) ? sx : [sx])
|
|
144
|
-
|
|
145
|
-
disableIgnoringDatePartForTimeValidation: disableIgnoringDatePartForTimeValidation,
|
|
146
|
-
timeSteps: timeSteps,
|
|
147
|
-
skipDisabled: skipDisabled,
|
|
148
|
-
timezone: timezone
|
|
149
|
-
})]
|
|
167
|
+
}, Array.isArray(sx) ? sx : [sx])
|
|
168
|
+
}))]
|
|
150
169
|
})]
|
|
151
170
|
}), isActionBarVisible && /*#__PURE__*/_jsx(Divider, {})]
|
|
152
171
|
});
|
package/modern/index.js
CHANGED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
+
const _excluded = ["before", "after"];
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import Stack from '@mui/material/Stack';
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
|
+
export const FakeTextField = /*#__PURE__*/React.forwardRef(function FakeTextField(props, ref) {
|
|
9
|
+
const {
|
|
10
|
+
elements
|
|
11
|
+
} = props;
|
|
12
|
+
return /*#__PURE__*/_jsx(Stack, {
|
|
13
|
+
direction: "row",
|
|
14
|
+
spacing: 1,
|
|
15
|
+
ref: ref,
|
|
16
|
+
children: elements.map((_ref, elementIndex) => {
|
|
17
|
+
let {
|
|
18
|
+
before,
|
|
19
|
+
after
|
|
20
|
+
} = _ref,
|
|
21
|
+
otherElementProps = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
22
|
+
return /*#__PURE__*/_jsxs(React.Fragment, {
|
|
23
|
+
children: [before, /*#__PURE__*/_jsx("input", _extends({}, otherElementProps)), after]
|
|
24
|
+
}, elementIndex);
|
|
25
|
+
})
|
|
26
|
+
});
|
|
27
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { FakeTextField } from './FakeTextField';
|
|
@@ -161,6 +161,11 @@ export const useField = params => {
|
|
|
161
161
|
return;
|
|
162
162
|
}
|
|
163
163
|
const targetValue = event.target.value;
|
|
164
|
+
if (targetValue === '') {
|
|
165
|
+
resetCharacterQuery();
|
|
166
|
+
clearValue();
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
164
169
|
const eventData = event.nativeEvent.data;
|
|
165
170
|
// Calling `.fill(04/11/2022)` in playwright will trigger a change event with the requested content to insert in `event.nativeEvent.data`
|
|
166
171
|
// usual changes have only the currently typed character in the `event.nativeEvent.data`
|
|
@@ -200,8 +205,13 @@ export const useField = params => {
|
|
|
200
205
|
const activeSectionEndRelativeToNewValue = cleanValueStr.length - prevValueStr.length + activeSection.end - cleanString(activeSection.endSeparator || '').length;
|
|
201
206
|
keyPressed = cleanValueStr.slice(activeSection.start + cleanString(activeSection.startSeparator || '').length, activeSectionEndRelativeToNewValue);
|
|
202
207
|
}
|
|
203
|
-
if (
|
|
204
|
-
|
|
208
|
+
if (keyPressed.length === 0) {
|
|
209
|
+
if (isAndroid()) {
|
|
210
|
+
setTempAndroidValueStr(valueStr);
|
|
211
|
+
} else {
|
|
212
|
+
resetCharacterQuery();
|
|
213
|
+
clearActiveSection();
|
|
214
|
+
}
|
|
205
215
|
return;
|
|
206
216
|
}
|
|
207
217
|
applyCharacterEditing({
|
|
@@ -259,7 +269,7 @@ export const useField = params => {
|
|
|
259
269
|
}
|
|
260
270
|
|
|
261
271
|
// Reset the value of the selected section
|
|
262
|
-
case
|
|
272
|
+
case event.key === 'Delete':
|
|
263
273
|
{
|
|
264
274
|
event.preventDefault();
|
|
265
275
|
if (readOnly) {
|
|
@@ -320,7 +330,7 @@ export const useField = params => {
|
|
|
320
330
|
// Fix scroll jumping on iOS browser: https://github.com/mui/mui-x/issues/8321
|
|
321
331
|
const currentScrollTop = inputRef.current.scrollTop;
|
|
322
332
|
// On multi input range pickers we want to update selection range only for the active input
|
|
323
|
-
// This helps
|
|
333
|
+
// This helps to avoid the focus jumping on Safari https://github.com/mui/mui-x/issues/9003
|
|
324
334
|
// because WebKit implements the `setSelectionRange` based on the spec: https://bugs.webkit.org/show_bug.cgi?id=224425
|
|
325
335
|
if (inputRef.current === getActiveElement(document)) {
|
|
326
336
|
inputRef.current.setSelectionRange(selectionStart, selectionEnd);
|
|
@@ -300,7 +300,7 @@ export const doesSectionFormatHaveLeadingZeros = (utils, timezone, contentType,
|
|
|
300
300
|
}
|
|
301
301
|
case 'seconds':
|
|
302
302
|
{
|
|
303
|
-
return utils.formatByString(utils.
|
|
303
|
+
return utils.formatByString(utils.setSeconds(now, 1), format).length > 1;
|
|
304
304
|
}
|
|
305
305
|
default:
|
|
306
306
|
{
|
|
@@ -117,6 +117,9 @@ export const useFieldState = params => {
|
|
|
117
117
|
referenceValue,
|
|
118
118
|
tempValueStrAndroid: null
|
|
119
119
|
}));
|
|
120
|
+
if (valueManager.areValuesEqual(utils, state.value, value)) {
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
120
123
|
const context = {
|
|
121
124
|
validationError: validator({
|
|
122
125
|
adapter,
|
|
@@ -138,9 +141,6 @@ export const useFieldState = params => {
|
|
|
138
141
|
return addPositionPropertiesToSections(newSections, isRTL);
|
|
139
142
|
};
|
|
140
143
|
const clearValue = () => {
|
|
141
|
-
if (valueManager.areValuesEqual(utils, state.value, valueManager.emptyValue)) {
|
|
142
|
-
return;
|
|
143
|
-
}
|
|
144
144
|
publishValue({
|
|
145
145
|
value: valueManager.emptyValue,
|
|
146
146
|
referenceValue: state.referenceValue,
|
|
@@ -152,14 +152,11 @@ export const useFieldState = params => {
|
|
|
152
152
|
return;
|
|
153
153
|
}
|
|
154
154
|
const activeSection = state.sections[selectedSectionIndexes.startIndex];
|
|
155
|
-
if (activeSection.value === '') {
|
|
156
|
-
return;
|
|
157
|
-
}
|
|
158
155
|
const activeDateManager = fieldValueManager.getActiveDateManager(utils, state, activeSection);
|
|
159
156
|
const nonEmptySectionCountBefore = activeDateManager.getSections(state.sections).filter(section => section.value !== '').length;
|
|
160
|
-
const
|
|
157
|
+
const hasNoOtherNonEmptySections = nonEmptySectionCountBefore === (activeSection.value === '' ? 0 : 1);
|
|
161
158
|
const newSections = setSectionValue(selectedSectionIndexes.startIndex, '');
|
|
162
|
-
const newActiveDate =
|
|
159
|
+
const newActiveDate = hasNoOtherNonEmptySections ? null : utils.date(new Date(''));
|
|
163
160
|
const newValues = activeDateManager.getNewValuesFromNewActiveDate(newActiveDate);
|
|
164
161
|
if ((newActiveDate != null && !utils.isValid(newActiveDate)) !== (activeDateManager.date != null && !utils.isValid(activeDateManager.date))) {
|
|
165
162
|
publishValue(_extends({}, newValues, {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
3
|
const _excluded = ["views", "format"];
|
|
4
|
-
import { resolveTimeFormat, isTimeView } from './time-utils';
|
|
4
|
+
import { resolveTimeFormat, isTimeView, isInternalTimeView } from './time-utils';
|
|
5
5
|
import { resolveDateFormat } from './date-utils';
|
|
6
6
|
export const resolveDateTimeFormat = (utils, _ref) => {
|
|
7
7
|
let {
|
|
@@ -38,4 +38,31 @@ export const resolveDateTimeFormat = (utils, _ref) => {
|
|
|
38
38
|
views: dateViews
|
|
39
39
|
}, other), false);
|
|
40
40
|
return `${dateFormat} ${timeFormat}`;
|
|
41
|
-
};
|
|
41
|
+
};
|
|
42
|
+
const resolveViews = (ampm, views, shouldUseSingleColumn) => {
|
|
43
|
+
if (shouldUseSingleColumn) {
|
|
44
|
+
return views.filter(view => !isInternalTimeView(view) || view === 'hours');
|
|
45
|
+
}
|
|
46
|
+
return ampm ? [...views, 'meridiem'] : views;
|
|
47
|
+
};
|
|
48
|
+
const resolveShouldRenderTimeInASingleColumn = (timeSteps, threshold) => 24 * 60 / ((timeSteps.hours ?? 1) * (timeSteps.minutes ?? 5)) <= threshold;
|
|
49
|
+
export function resolveTimeViewsResponse({
|
|
50
|
+
thresholdToRenderTimeInASingleColumn: inThreshold,
|
|
51
|
+
ampm,
|
|
52
|
+
timeSteps: inTimeSteps,
|
|
53
|
+
views
|
|
54
|
+
}) {
|
|
55
|
+
const thresholdToRenderTimeInASingleColumn = inThreshold ?? 24;
|
|
56
|
+
const timeSteps = _extends({
|
|
57
|
+
hours: 1,
|
|
58
|
+
minutes: 5,
|
|
59
|
+
seconds: 5
|
|
60
|
+
}, inTimeSteps);
|
|
61
|
+
const shouldRenderTimeInASingleColumn = resolveShouldRenderTimeInASingleColumn(timeSteps, thresholdToRenderTimeInASingleColumn);
|
|
62
|
+
return {
|
|
63
|
+
thresholdToRenderTimeInASingleColumn,
|
|
64
|
+
timeSteps,
|
|
65
|
+
shouldRenderTimeInASingleColumn,
|
|
66
|
+
views: resolveViews(ampm, views, shouldRenderTimeInASingleColumn)
|
|
67
|
+
};
|
|
68
|
+
}
|
package/modern/locales/esES.js
CHANGED
|
@@ -47,7 +47,7 @@ const esESPickers = {
|
|
|
47
47
|
timeTableLabel: 'elige la fecha',
|
|
48
48
|
dateTableLabel: 'elige la hora',
|
|
49
49
|
// Field section placeholders
|
|
50
|
-
fieldYearPlaceholder: params => '
|
|
50
|
+
fieldYearPlaceholder: params => 'A'.repeat(params.digitAmount),
|
|
51
51
|
fieldMonthPlaceholder: params => params.contentType === 'letter' ? 'MMMM' : 'MM',
|
|
52
52
|
fieldDayPlaceholder: () => 'DD',
|
|
53
53
|
fieldWeekDayPlaceholder: params => params.contentType === 'letter' ? 'EEEE' : 'EE',
|
|
@@ -303,13 +303,15 @@ class AdapterDayjs {
|
|
|
303
303
|
return parsedValue.locale(this.locale);
|
|
304
304
|
};
|
|
305
305
|
this.getTimezone = value => {
|
|
306
|
-
if (this.hasUTCPlugin() && value.isUTC()) {
|
|
307
|
-
return 'UTC';
|
|
308
|
-
}
|
|
309
306
|
if (this.hasTimezonePlugin()) {
|
|
310
307
|
// @ts-ignore
|
|
311
308
|
const zone = value.$x?.$timezone;
|
|
312
|
-
|
|
309
|
+
if (zone) {
|
|
310
|
+
return zone;
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
if (this.hasUTCPlugin() && value.isUTC()) {
|
|
314
|
+
return 'UTC';
|
|
313
315
|
}
|
|
314
316
|
return 'system';
|
|
315
317
|
};
|
|
@@ -247,16 +247,13 @@ class AdapterMoment {
|
|
|
247
247
|
return this.createTZDate(value, timezone);
|
|
248
248
|
};
|
|
249
249
|
this.getTimezone = value => {
|
|
250
|
-
if (value.isUTC()) {
|
|
251
|
-
return 'UTC';
|
|
252
|
-
}
|
|
253
|
-
|
|
254
250
|
// @ts-ignore
|
|
255
251
|
// eslint-disable-next-line no-underscore-dangle
|
|
256
252
|
const zone = value._z?.name;
|
|
253
|
+
const defaultZone = value.isUTC() ? 'UTC' : 'system';
|
|
257
254
|
|
|
258
255
|
// @ts-ignore
|
|
259
|
-
return zone ?? this.moment.defaultZone?.name ??
|
|
256
|
+
return zone ?? this.moment.defaultZone?.name ?? defaultZone;
|
|
260
257
|
};
|
|
261
258
|
this.setTimezone = (value, timezone) => {
|
|
262
259
|
if (this.getTimezone(value) === timezone) {
|
|
@@ -30,8 +30,8 @@ var _valueManagers = require("../internals/utils/valueManagers");
|
|
|
30
30
|
var _dimensions = require("../internals/constants/dimensions");
|
|
31
31
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
32
32
|
const _excluded = ["autoFocus", "onViewChange", "value", "defaultValue", "referenceDate", "disableFuture", "disablePast", "defaultCalendarMonth", "onChange", "onYearChange", "onMonthChange", "reduceAnimations", "shouldDisableDate", "shouldDisableMonth", "shouldDisableYear", "view", "views", "openTo", "className", "disabled", "readOnly", "minDate", "maxDate", "disableHighlightToday", "focusedView", "onFocusedViewChange", "showDaysOutsideCurrentMonth", "fixedWeekNumber", "dayOfWeekFormatter", "components", "componentsProps", "slots", "slotProps", "loading", "renderLoading", "displayWeekNumber", "yearsPerRow", "monthsPerRow", "timezone"];
|
|
33
|
-
function _getRequireWildcardCache(
|
|
34
|
-
function _interopRequireWildcard(
|
|
33
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
34
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
35
35
|
const useUtilityClasses = ownerState => {
|
|
36
36
|
const {
|
|
37
37
|
classes
|
|
@@ -24,8 +24,8 @@ var _dayCalendarClasses = require("./dayCalendarClasses");
|
|
|
24
24
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
25
25
|
const _excluded = ["parentProps", "day", "focusableDay", "selectedDays", "isDateDisabled", "currentMonthNumber", "isViewFocused"],
|
|
26
26
|
_excluded2 = ["ownerState"];
|
|
27
|
-
function _getRequireWildcardCache(
|
|
28
|
-
function _interopRequireWildcard(
|
|
27
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
28
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
29
29
|
const useUtilityClasses = ownerState => {
|
|
30
30
|
const {
|
|
31
31
|
classes
|
|
@@ -13,8 +13,8 @@ var _styles = require("@mui/material/styles");
|
|
|
13
13
|
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
14
14
|
var _pickersFadeTransitionGroupClasses = require("./pickersFadeTransitionGroupClasses");
|
|
15
15
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
|
-
function _getRequireWildcardCache(
|
|
17
|
-
function _interopRequireWildcard(
|
|
16
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
17
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
18
18
|
const useUtilityClasses = ownerState => {
|
|
19
19
|
const {
|
|
20
20
|
classes
|
|
@@ -15,8 +15,8 @@ var _reactTransitionGroup = require("react-transition-group");
|
|
|
15
15
|
var _pickersSlideTransitionClasses = require("./pickersSlideTransitionClasses");
|
|
16
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
17
|
const _excluded = ["children", "className", "reduceAnimations", "slideDirection", "transKey", "classes"];
|
|
18
|
-
function _getRequireWildcardCache(
|
|
19
|
-
function _interopRequireWildcard(
|
|
18
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
19
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
20
20
|
const useUtilityClasses = ownerState => {
|
|
21
21
|
const {
|
|
22
22
|
classes,
|
|
@@ -12,8 +12,8 @@ var _useIsDateDisabled = require("./useIsDateDisabled");
|
|
|
12
12
|
var _useUtils = require("../internals/hooks/useUtils");
|
|
13
13
|
var _valueManagers = require("../internals/utils/valueManagers");
|
|
14
14
|
var _getDefaultReferenceDate = require("../internals/utils/getDefaultReferenceDate");
|
|
15
|
-
function _getRequireWildcardCache(
|
|
16
|
-
function _interopRequireWildcard(
|
|
15
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
16
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
17
17
|
const createCalendarStateReducer = (reduceAnimations, disableSwitchToMonthOnDayFocus, utils) => (state, action) => {
|
|
18
18
|
switch (action.type) {
|
|
19
19
|
case 'changeMonth':
|