@mui/x-date-pickers-pro 7.1.0 → 7.2.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/CHANGELOG.md +261 -4
- package/DateRangeCalendar/DateRangeCalendar.js +1 -1
- package/DateRangePicker/DateRangePicker.js +1 -1
- package/DateTimeRangePicker/DateTimeRangePicker.js +2 -2
- package/DateTimeRangePicker/DateTimeRangePickerToolbar.js +1 -3
- package/DesktopDateRangePicker/DesktopDateRangePicker.js +1 -1
- package/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.js +14 -5
- package/MobileDateRangePicker/MobileDateRangePicker.js +1 -1
- package/MobileDateTimeRangePicker/MobileDateTimeRangePicker.js +2 -2
- package/MultiInputDateRangeField/MultiInputDateRangeField.js +1 -1
- package/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +2 -2
- package/MultiInputTimeRangeField/MultiInputTimeRangeField.js +2 -2
- package/README.md +1 -1
- package/SingleInputDateRangeField/SingleInputDateRangeField.js +1 -1
- package/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +2 -2
- package/SingleInputTimeRangeField/SingleInputTimeRangeField.js +2 -2
- package/StaticDateRangePicker/StaticDateRangePicker.js +1 -1
- package/index.js +1 -1
- package/internals/hooks/useEnrichedRangePickerFieldProps.js +3 -3
- package/internals/models/dateTimeRange.d.ts +1 -1
- package/internals/models/timeRange.d.ts +1 -1
- package/internals/utils/date-range-manager.js +1 -1
- package/internals/utils/releaseInfo.js +1 -1
- package/modern/DateRangeCalendar/DateRangeCalendar.js +1 -1
- package/modern/DateRangePicker/DateRangePicker.js +1 -1
- package/modern/DateTimeRangePicker/DateTimeRangePicker.js +2 -2
- package/modern/DateTimeRangePicker/DateTimeRangePickerToolbar.js +1 -3
- package/modern/DesktopDateRangePicker/DesktopDateRangePicker.js +1 -1
- package/modern/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.js +14 -5
- package/modern/MobileDateRangePicker/MobileDateRangePicker.js +1 -1
- package/modern/MobileDateTimeRangePicker/MobileDateTimeRangePicker.js +2 -2
- package/modern/MultiInputDateRangeField/MultiInputDateRangeField.js +1 -1
- package/modern/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +2 -2
- package/modern/MultiInputTimeRangeField/MultiInputTimeRangeField.js +2 -2
- package/modern/SingleInputDateRangeField/SingleInputDateRangeField.js +1 -1
- package/modern/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +2 -2
- package/modern/SingleInputTimeRangeField/SingleInputTimeRangeField.js +2 -2
- package/modern/StaticDateRangePicker/StaticDateRangePicker.js +1 -1
- package/modern/index.js +1 -1
- package/modern/internals/hooks/useEnrichedRangePickerFieldProps.js +3 -3
- package/modern/internals/utils/date-range-manager.js +1 -1
- package/modern/internals/utils/releaseInfo.js +1 -1
- package/node/DateRangeCalendar/DateRangeCalendar.js +1 -1
- package/node/DateRangePicker/DateRangePicker.js +1 -1
- package/node/DateTimeRangePicker/DateTimeRangePicker.js +2 -2
- package/node/DateTimeRangePicker/DateTimeRangePickerToolbar.js +1 -3
- package/node/DesktopDateRangePicker/DesktopDateRangePicker.js +1 -1
- package/node/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.js +14 -5
- package/node/MobileDateRangePicker/MobileDateRangePicker.js +1 -1
- package/node/MobileDateTimeRangePicker/MobileDateTimeRangePicker.js +2 -2
- package/node/MultiInputDateRangeField/MultiInputDateRangeField.js +1 -1
- package/node/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +2 -2
- package/node/MultiInputTimeRangeField/MultiInputTimeRangeField.js +2 -2
- package/node/SingleInputDateRangeField/SingleInputDateRangeField.js +1 -1
- package/node/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +2 -2
- package/node/SingleInputTimeRangeField/SingleInputTimeRangeField.js +2 -2
- package/node/StaticDateRangePicker/StaticDateRangePicker.js +1 -1
- package/node/index.js +1 -1
- package/node/internals/hooks/useEnrichedRangePickerFieldProps.js +3 -3
- package/node/internals/utils/date-range-manager.js +1 -1
- package/node/internals/utils/releaseInfo.js +1 -1
- package/package.json +4 -4
|
@@ -49,7 +49,7 @@ process.env.NODE_ENV !== "production" ? DateTimeRangePicker.propTypes = {
|
|
|
49
49
|
// ----------------------------------------------------------------------
|
|
50
50
|
/**
|
|
51
51
|
* 12h/24h view for hour selection clock.
|
|
52
|
-
* @default
|
|
52
|
+
* @default utils.is12HourCycleInCurrentLocale()
|
|
53
53
|
*/
|
|
54
54
|
ampm: PropTypes.bool,
|
|
55
55
|
/**
|
|
@@ -79,7 +79,7 @@ process.env.NODE_ENV !== "production" ? DateTimeRangePicker.propTypes = {
|
|
|
79
79
|
* Formats the day of week displayed in the calendar header.
|
|
80
80
|
* @param {TDate} date The date of the day of week provided by the adapter.
|
|
81
81
|
* @returns {string} The name to display.
|
|
82
|
-
* @default (
|
|
82
|
+
* @default (date: TDate) => adapter.format(date, 'weekdayShort').charAt(0).toUpperCase()
|
|
83
83
|
*/
|
|
84
84
|
dayOfWeekFormatter: PropTypes.func,
|
|
85
85
|
/**
|
|
@@ -85,7 +85,7 @@ DesktopDateRangePicker.propTypes = {
|
|
|
85
85
|
* Formats the day of week displayed in the calendar header.
|
|
86
86
|
* @param {TDate} date The date of the day of week provided by the adapter.
|
|
87
87
|
* @returns {string} The name to display.
|
|
88
|
-
* @default (
|
|
88
|
+
* @default (date: TDate) => adapter.format(date, 'weekdayShort').charAt(0).toUpperCase()
|
|
89
89
|
*/
|
|
90
90
|
dayOfWeekFormatter: PropTypes.func,
|
|
91
91
|
/**
|
|
@@ -44,14 +44,23 @@ const rendererInterceptor = function rendererInterceptor(inViewRenderers, popper
|
|
|
44
44
|
children: [inViewRenderers.day?.(_extends({}, rendererProps, {
|
|
45
45
|
availableRangePositions: [rangePosition],
|
|
46
46
|
view: !isTimeViewActive ? popperView : 'day',
|
|
47
|
-
views: rendererProps.views.filter(isDatePickerView)
|
|
47
|
+
views: rendererProps.views.filter(isDatePickerView),
|
|
48
|
+
sx: [{
|
|
49
|
+
gridColumn: 1
|
|
50
|
+
}, ...finalProps.sx]
|
|
48
51
|
})), /*#__PURE__*/_jsx(Divider, {
|
|
49
|
-
orientation: "vertical"
|
|
52
|
+
orientation: "vertical",
|
|
53
|
+
sx: {
|
|
54
|
+
gridColumn: 2
|
|
55
|
+
}
|
|
50
56
|
}), /*#__PURE__*/_jsx(DateTimeRangePickerTimeWrapper, _extends({}, finalProps, {
|
|
51
57
|
view: isTimeViewActive ? popperView : 'hours',
|
|
52
58
|
views: finalProps.views.filter(isInternalTimeView),
|
|
53
59
|
openTo: isInternalTimeView(openTo) ? openTo : 'hours',
|
|
54
|
-
viewRenderer: inViewRenderers[isTimeViewActive ? popperView : 'hours']
|
|
60
|
+
viewRenderer: inViewRenderers[isTimeViewActive ? popperView : 'hours'],
|
|
61
|
+
sx: [{
|
|
62
|
+
gridColumn: 3
|
|
63
|
+
}, ...finalProps.sx]
|
|
55
64
|
}))]
|
|
56
65
|
});
|
|
57
66
|
};
|
|
@@ -125,7 +134,7 @@ DesktopDateTimeRangePicker.propTypes = {
|
|
|
125
134
|
// ----------------------------------------------------------------------
|
|
126
135
|
/**
|
|
127
136
|
* 12h/24h view for hour selection clock.
|
|
128
|
-
* @default
|
|
137
|
+
* @default utils.is12HourCycleInCurrentLocale()
|
|
129
138
|
*/
|
|
130
139
|
ampm: PropTypes.bool,
|
|
131
140
|
/**
|
|
@@ -155,7 +164,7 @@ DesktopDateTimeRangePicker.propTypes = {
|
|
|
155
164
|
* Formats the day of week displayed in the calendar header.
|
|
156
165
|
* @param {TDate} date The date of the day of week provided by the adapter.
|
|
157
166
|
* @returns {string} The name to display.
|
|
158
|
-
* @default (
|
|
167
|
+
* @default (date: TDate) => adapter.format(date, 'weekdayShort').charAt(0).toUpperCase()
|
|
159
168
|
*/
|
|
160
169
|
dayOfWeekFormatter: PropTypes.func,
|
|
161
170
|
/**
|
|
@@ -81,7 +81,7 @@ MobileDateRangePicker.propTypes = {
|
|
|
81
81
|
* Formats the day of week displayed in the calendar header.
|
|
82
82
|
* @param {TDate} date The date of the day of week provided by the adapter.
|
|
83
83
|
* @returns {string} The name to display.
|
|
84
|
-
* @default (
|
|
84
|
+
* @default (date: TDate) => adapter.format(date, 'weekdayShort').charAt(0).toUpperCase()
|
|
85
85
|
*/
|
|
86
86
|
dayOfWeekFormatter: PropTypes.func,
|
|
87
87
|
/**
|
|
@@ -132,7 +132,7 @@ MobileDateTimeRangePicker.propTypes = {
|
|
|
132
132
|
// ----------------------------------------------------------------------
|
|
133
133
|
/**
|
|
134
134
|
* 12h/24h view for hour selection clock.
|
|
135
|
-
* @default
|
|
135
|
+
* @default utils.is12HourCycleInCurrentLocale()
|
|
136
136
|
*/
|
|
137
137
|
ampm: PropTypes.bool,
|
|
138
138
|
/**
|
|
@@ -157,7 +157,7 @@ MobileDateTimeRangePicker.propTypes = {
|
|
|
157
157
|
* Formats the day of week displayed in the calendar header.
|
|
158
158
|
* @param {TDate} date The date of the day of week provided by the adapter.
|
|
159
159
|
* @returns {string} The name to display.
|
|
160
|
-
* @default (
|
|
160
|
+
* @default (date: TDate) => adapter.format(date, 'weekdayShort').charAt(0).toUpperCase()
|
|
161
161
|
*/
|
|
162
162
|
dayOfWeekFormatter: PropTypes.func,
|
|
163
163
|
/**
|
|
@@ -263,7 +263,7 @@ process.env.NODE_ENV !== "production" ? MultiInputDateRangeField.propTypes = {
|
|
|
263
263
|
* Warning n°3: When used in strict mode, dayjs and moment require to respect the leading zeros.
|
|
264
264
|
* This mean that when using `shouldRespectLeadingZeros={false}`, if you retrieve the value directly from the input (not listening to `onChange`) and your format contains tokens without leading zeros, the value will not be parsed by your library.
|
|
265
265
|
*
|
|
266
|
-
* @default
|
|
266
|
+
* @default false
|
|
267
267
|
*/
|
|
268
268
|
shouldRespectLeadingZeros: PropTypes.bool,
|
|
269
269
|
/**
|
|
@@ -133,7 +133,7 @@ process.env.NODE_ENV !== "production" ? MultiInputDateTimeRangeField.propTypes =
|
|
|
133
133
|
// ----------------------------------------------------------------------
|
|
134
134
|
/**
|
|
135
135
|
* 12h/24h view for hour selection clock.
|
|
136
|
-
* @default
|
|
136
|
+
* @default utils.is12HourCycleInCurrentLocale()
|
|
137
137
|
*/
|
|
138
138
|
ampm: PropTypes.bool,
|
|
139
139
|
/**
|
|
@@ -304,7 +304,7 @@ process.env.NODE_ENV !== "production" ? MultiInputDateTimeRangeField.propTypes =
|
|
|
304
304
|
* Warning n°3: When used in strict mode, dayjs and moment require to respect the leading zeros.
|
|
305
305
|
* This mean that when using `shouldRespectLeadingZeros={false}`, if you retrieve the value directly from the input (not listening to `onChange`) and your format contains tokens without leading zeros, the value will not be parsed by your library.
|
|
306
306
|
*
|
|
307
|
-
* @default
|
|
307
|
+
* @default false
|
|
308
308
|
*/
|
|
309
309
|
shouldRespectLeadingZeros: PropTypes.bool,
|
|
310
310
|
/**
|
|
@@ -133,7 +133,7 @@ process.env.NODE_ENV !== "production" ? MultiInputTimeRangeField.propTypes = {
|
|
|
133
133
|
// ----------------------------------------------------------------------
|
|
134
134
|
/**
|
|
135
135
|
* 12h/24h view for hour selection clock.
|
|
136
|
-
* @default
|
|
136
|
+
* @default utils.is12HourCycleInCurrentLocale()
|
|
137
137
|
*/
|
|
138
138
|
ampm: PropTypes.bool,
|
|
139
139
|
/**
|
|
@@ -277,7 +277,7 @@ process.env.NODE_ENV !== "production" ? MultiInputTimeRangeField.propTypes = {
|
|
|
277
277
|
* Warning n°3: When used in strict mode, dayjs and moment require to respect the leading zeros.
|
|
278
278
|
* This mean that when using `shouldRespectLeadingZeros={false}`, if you retrieve the value directly from the input (not listening to `onChange`) and your format contains tokens without leading zeros, the value will not be parsed by your library.
|
|
279
279
|
*
|
|
280
|
-
* @default
|
|
280
|
+
* @default false
|
|
281
281
|
*/
|
|
282
282
|
shouldRespectLeadingZeros: PropTypes.bool,
|
|
283
283
|
/**
|
|
@@ -267,7 +267,7 @@ process.env.NODE_ENV !== "production" ? SingleInputDateRangeField.propTypes = {
|
|
|
267
267
|
* Warning n°3: When used in strict mode, dayjs and moment require to respect the leading zeros.
|
|
268
268
|
* This mean that when using `shouldRespectLeadingZeros={false}`, if you retrieve the value directly from the input (not listening to `onChange`) and your format contains tokens without leading zeros, the value will not be parsed by your library.
|
|
269
269
|
*
|
|
270
|
-
* @default
|
|
270
|
+
* @default false
|
|
271
271
|
*/
|
|
272
272
|
shouldRespectLeadingZeros: PropTypes.bool,
|
|
273
273
|
/**
|
|
@@ -65,7 +65,7 @@ process.env.NODE_ENV !== "production" ? SingleInputDateTimeRangeField.propTypes
|
|
|
65
65
|
// ----------------------------------------------------------------------
|
|
66
66
|
/**
|
|
67
67
|
* 12h/24h view for hour selection clock.
|
|
68
|
-
* @default
|
|
68
|
+
* @default utils.is12HourCycleInCurrentLocale()
|
|
69
69
|
*/
|
|
70
70
|
ampm: PropTypes.bool,
|
|
71
71
|
/**
|
|
@@ -308,7 +308,7 @@ process.env.NODE_ENV !== "production" ? SingleInputDateTimeRangeField.propTypes
|
|
|
308
308
|
* Warning n°3: When used in strict mode, dayjs and moment require to respect the leading zeros.
|
|
309
309
|
* This mean that when using `shouldRespectLeadingZeros={false}`, if you retrieve the value directly from the input (not listening to `onChange`) and your format contains tokens without leading zeros, the value will not be parsed by your library.
|
|
310
310
|
*
|
|
311
|
-
* @default
|
|
311
|
+
* @default false
|
|
312
312
|
*/
|
|
313
313
|
shouldRespectLeadingZeros: PropTypes.bool,
|
|
314
314
|
/**
|
|
@@ -65,7 +65,7 @@ process.env.NODE_ENV !== "production" ? SingleInputTimeRangeField.propTypes = {
|
|
|
65
65
|
// ----------------------------------------------------------------------
|
|
66
66
|
/**
|
|
67
67
|
* 12h/24h view for hour selection clock.
|
|
68
|
-
* @default
|
|
68
|
+
* @default utils.is12HourCycleInCurrentLocale()
|
|
69
69
|
*/
|
|
70
70
|
ampm: PropTypes.bool,
|
|
71
71
|
/**
|
|
@@ -281,7 +281,7 @@ process.env.NODE_ENV !== "production" ? SingleInputTimeRangeField.propTypes = {
|
|
|
281
281
|
* Warning n°3: When used in strict mode, dayjs and moment require to respect the leading zeros.
|
|
282
282
|
* This mean that when using `shouldRespectLeadingZeros={false}`, if you retrieve the value directly from the input (not listening to `onChange`) and your format contains tokens without leading zeros, the value will not be parsed by your library.
|
|
283
283
|
*
|
|
284
|
-
* @default
|
|
284
|
+
* @default false
|
|
285
285
|
*/
|
|
286
286
|
shouldRespectLeadingZeros: PropTypes.bool,
|
|
287
287
|
/**
|
|
@@ -74,7 +74,7 @@ StaticDateRangePicker.propTypes = {
|
|
|
74
74
|
* Formats the day of week displayed in the calendar header.
|
|
75
75
|
* @param {TDate} date The date of the day of week provided by the adapter.
|
|
76
76
|
* @returns {string} The name to display.
|
|
77
|
-
* @default (
|
|
77
|
+
* @default (date: TDate) => adapter.format(date, 'weekdayShort').charAt(0).toUpperCase()
|
|
78
78
|
*/
|
|
79
79
|
dayOfWeekFormatter: PropTypes.func,
|
|
80
80
|
/**
|
package/modern/index.js
CHANGED
|
@@ -53,14 +53,14 @@ const useMultiInputFieldSlotProps = ({
|
|
|
53
53
|
event.stopPropagation();
|
|
54
54
|
onRangePositionChange('start');
|
|
55
55
|
if (!readOnly && !disableOpenPicker) {
|
|
56
|
-
actions.onOpen();
|
|
56
|
+
actions.onOpen(event);
|
|
57
57
|
}
|
|
58
58
|
};
|
|
59
59
|
const openRangeEndSelection = event => {
|
|
60
60
|
event.stopPropagation();
|
|
61
61
|
onRangePositionChange('end');
|
|
62
62
|
if (!readOnly && !disableOpenPicker) {
|
|
63
|
-
actions.onOpen();
|
|
63
|
+
actions.onOpen(event);
|
|
64
64
|
}
|
|
65
65
|
};
|
|
66
66
|
const handleFocusStart = () => {
|
|
@@ -197,7 +197,7 @@ const useSingleInputFieldSlotProps = ({
|
|
|
197
197
|
const openPicker = event => {
|
|
198
198
|
event.stopPropagation();
|
|
199
199
|
if (!readOnly && !disableOpenPicker) {
|
|
200
|
-
actions.onOpen();
|
|
200
|
+
actions.onOpen(event);
|
|
201
201
|
}
|
|
202
202
|
};
|
|
203
203
|
const slots = _extends({}, fieldProps.slots, {
|
|
@@ -37,7 +37,7 @@ export function calculateRangeChange({
|
|
|
37
37
|
nextSelection: 'end',
|
|
38
38
|
newRange: [selectedDate, null]
|
|
39
39
|
};
|
|
40
|
-
return Boolean(start) && utils.
|
|
40
|
+
return Boolean(start) && utils.isBeforeDay(selectedDate, start) ? truthyResult : {
|
|
41
41
|
nextSelection: 'start',
|
|
42
42
|
newRange: [start, selectedDate]
|
|
43
43
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ponyfillGlobal } from '@mui/utils';
|
|
2
2
|
export const getReleaseInfo = () => {
|
|
3
|
-
const releaseInfo = "
|
|
3
|
+
const releaseInfo = "MTcxMjg2OTIwMDAwMA==";
|
|
4
4
|
if (process.env.NODE_ENV !== 'production') {
|
|
5
5
|
// A simple hack to set the value in the test environment (has no build step).
|
|
6
6
|
// eslint-disable-next-line no-useless-concat
|
|
@@ -516,7 +516,7 @@ process.env.NODE_ENV !== "production" ? DateRangeCalendar.propTypes = {
|
|
|
516
516
|
* Formats the day of week displayed in the calendar header.
|
|
517
517
|
* @param {TDate} date The date of the day of week provided by the adapter.
|
|
518
518
|
* @returns {string} The name to display.
|
|
519
|
-
* @default (
|
|
519
|
+
* @default (date: TDate) => adapter.format(date, 'weekdayShort').charAt(0).toUpperCase()
|
|
520
520
|
*/
|
|
521
521
|
dayOfWeekFormatter: _propTypes.default.func,
|
|
522
522
|
/**
|
|
@@ -83,7 +83,7 @@ process.env.NODE_ENV !== "production" ? DateRangePicker.propTypes = {
|
|
|
83
83
|
* Formats the day of week displayed in the calendar header.
|
|
84
84
|
* @param {TDate} date The date of the day of week provided by the adapter.
|
|
85
85
|
* @returns {string} The name to display.
|
|
86
|
-
* @default (
|
|
86
|
+
* @default (date: TDate) => adapter.format(date, 'weekdayShort').charAt(0).toUpperCase()
|
|
87
87
|
*/
|
|
88
88
|
dayOfWeekFormatter: _propTypes.default.func,
|
|
89
89
|
/**
|
|
@@ -58,7 +58,7 @@ process.env.NODE_ENV !== "production" ? DateTimeRangePicker.propTypes = {
|
|
|
58
58
|
// ----------------------------------------------------------------------
|
|
59
59
|
/**
|
|
60
60
|
* 12h/24h view for hour selection clock.
|
|
61
|
-
* @default
|
|
61
|
+
* @default utils.is12HourCycleInCurrentLocale()
|
|
62
62
|
*/
|
|
63
63
|
ampm: _propTypes.default.bool,
|
|
64
64
|
/**
|
|
@@ -88,7 +88,7 @@ process.env.NODE_ENV !== "production" ? DateTimeRangePicker.propTypes = {
|
|
|
88
88
|
* Formats the day of week displayed in the calendar header.
|
|
89
89
|
* @param {TDate} date The date of the day of week provided by the adapter.
|
|
90
90
|
* @returns {string} The name to display.
|
|
91
|
-
* @default (
|
|
91
|
+
* @default (date: TDate) => adapter.format(date, 'weekdayShort').charAt(0).toUpperCase()
|
|
92
92
|
*/
|
|
93
93
|
dayOfWeekFormatter: _propTypes.default.func,
|
|
94
94
|
/**
|
|
@@ -68,9 +68,7 @@ const DateTimeRangePickerToolbarEnd = (0, _styles.styled)(_DateTimePicker.DateTi
|
|
|
68
68
|
})({
|
|
69
69
|
variants: [{
|
|
70
70
|
props: ({
|
|
71
|
-
|
|
72
|
-
toolbarVariant
|
|
73
|
-
}
|
|
71
|
+
toolbarVariant
|
|
74
72
|
}) => toolbarVariant !== 'desktop',
|
|
75
73
|
style: {
|
|
76
74
|
padding: '12px 8px 12px 12px'
|
|
@@ -94,7 +94,7 @@ DesktopDateRangePicker.propTypes = {
|
|
|
94
94
|
* Formats the day of week displayed in the calendar header.
|
|
95
95
|
* @param {TDate} date The date of the day of week provided by the adapter.
|
|
96
96
|
* @returns {string} The name to display.
|
|
97
|
-
* @default (
|
|
97
|
+
* @default (date: TDate) => adapter.format(date, 'weekdayShort').charAt(0).toUpperCase()
|
|
98
98
|
*/
|
|
99
99
|
dayOfWeekFormatter: _propTypes.default.func,
|
|
100
100
|
/**
|
|
@@ -52,14 +52,23 @@ const rendererInterceptor = function rendererInterceptor(inViewRenderers, popper
|
|
|
52
52
|
children: [inViewRenderers.day?.((0, _extends2.default)({}, rendererProps, {
|
|
53
53
|
availableRangePositions: [rangePosition],
|
|
54
54
|
view: !isTimeViewActive ? popperView : 'day',
|
|
55
|
-
views: rendererProps.views.filter(_internals.isDatePickerView)
|
|
55
|
+
views: rendererProps.views.filter(_internals.isDatePickerView),
|
|
56
|
+
sx: [{
|
|
57
|
+
gridColumn: 1
|
|
58
|
+
}, ...finalProps.sx]
|
|
56
59
|
})), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Divider.default, {
|
|
57
|
-
orientation: "vertical"
|
|
60
|
+
orientation: "vertical",
|
|
61
|
+
sx: {
|
|
62
|
+
gridColumn: 2
|
|
63
|
+
}
|
|
58
64
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_DateTimeRangePickerTimeWrapper.DateTimeRangePickerTimeWrapper, (0, _extends2.default)({}, finalProps, {
|
|
59
65
|
view: isTimeViewActive ? popperView : 'hours',
|
|
60
66
|
views: finalProps.views.filter(_internals.isInternalTimeView),
|
|
61
67
|
openTo: (0, _internals.isInternalTimeView)(openTo) ? openTo : 'hours',
|
|
62
|
-
viewRenderer: inViewRenderers[isTimeViewActive ? popperView : 'hours']
|
|
68
|
+
viewRenderer: inViewRenderers[isTimeViewActive ? popperView : 'hours'],
|
|
69
|
+
sx: [{
|
|
70
|
+
gridColumn: 3
|
|
71
|
+
}, ...finalProps.sx]
|
|
63
72
|
}))]
|
|
64
73
|
});
|
|
65
74
|
};
|
|
@@ -133,7 +142,7 @@ DesktopDateTimeRangePicker.propTypes = {
|
|
|
133
142
|
// ----------------------------------------------------------------------
|
|
134
143
|
/**
|
|
135
144
|
* 12h/24h view for hour selection clock.
|
|
136
|
-
* @default
|
|
145
|
+
* @default utils.is12HourCycleInCurrentLocale()
|
|
137
146
|
*/
|
|
138
147
|
ampm: _propTypes.default.bool,
|
|
139
148
|
/**
|
|
@@ -163,7 +172,7 @@ DesktopDateTimeRangePicker.propTypes = {
|
|
|
163
172
|
* Formats the day of week displayed in the calendar header.
|
|
164
173
|
* @param {TDate} date The date of the day of week provided by the adapter.
|
|
165
174
|
* @returns {string} The name to display.
|
|
166
|
-
* @default (
|
|
175
|
+
* @default (date: TDate) => adapter.format(date, 'weekdayShort').charAt(0).toUpperCase()
|
|
167
176
|
*/
|
|
168
177
|
dayOfWeekFormatter: _propTypes.default.func,
|
|
169
178
|
/**
|
|
@@ -90,7 +90,7 @@ MobileDateRangePicker.propTypes = {
|
|
|
90
90
|
* Formats the day of week displayed in the calendar header.
|
|
91
91
|
* @param {TDate} date The date of the day of week provided by the adapter.
|
|
92
92
|
* @returns {string} The name to display.
|
|
93
|
-
* @default (
|
|
93
|
+
* @default (date: TDate) => adapter.format(date, 'weekdayShort').charAt(0).toUpperCase()
|
|
94
94
|
*/
|
|
95
95
|
dayOfWeekFormatter: _propTypes.default.func,
|
|
96
96
|
/**
|
|
@@ -141,7 +141,7 @@ MobileDateTimeRangePicker.propTypes = {
|
|
|
141
141
|
// ----------------------------------------------------------------------
|
|
142
142
|
/**
|
|
143
143
|
* 12h/24h view for hour selection clock.
|
|
144
|
-
* @default
|
|
144
|
+
* @default utils.is12HourCycleInCurrentLocale()
|
|
145
145
|
*/
|
|
146
146
|
ampm: _propTypes.default.bool,
|
|
147
147
|
/**
|
|
@@ -166,7 +166,7 @@ MobileDateTimeRangePicker.propTypes = {
|
|
|
166
166
|
* Formats the day of week displayed in the calendar header.
|
|
167
167
|
* @param {TDate} date The date of the day of week provided by the adapter.
|
|
168
168
|
* @returns {string} The name to display.
|
|
169
|
-
* @default (
|
|
169
|
+
* @default (date: TDate) => adapter.format(date, 'weekdayShort').charAt(0).toUpperCase()
|
|
170
170
|
*/
|
|
171
171
|
dayOfWeekFormatter: _propTypes.default.func,
|
|
172
172
|
/**
|
|
@@ -272,7 +272,7 @@ process.env.NODE_ENV !== "production" ? MultiInputDateRangeField.propTypes = {
|
|
|
272
272
|
* Warning n°3: When used in strict mode, dayjs and moment require to respect the leading zeros.
|
|
273
273
|
* This mean that when using `shouldRespectLeadingZeros={false}`, if you retrieve the value directly from the input (not listening to `onChange`) and your format contains tokens without leading zeros, the value will not be parsed by your library.
|
|
274
274
|
*
|
|
275
|
-
* @default
|
|
275
|
+
* @default false
|
|
276
276
|
*/
|
|
277
277
|
shouldRespectLeadingZeros: _propTypes.default.bool,
|
|
278
278
|
/**
|
|
@@ -142,7 +142,7 @@ process.env.NODE_ENV !== "production" ? MultiInputDateTimeRangeField.propTypes =
|
|
|
142
142
|
// ----------------------------------------------------------------------
|
|
143
143
|
/**
|
|
144
144
|
* 12h/24h view for hour selection clock.
|
|
145
|
-
* @default
|
|
145
|
+
* @default utils.is12HourCycleInCurrentLocale()
|
|
146
146
|
*/
|
|
147
147
|
ampm: _propTypes.default.bool,
|
|
148
148
|
/**
|
|
@@ -313,7 +313,7 @@ process.env.NODE_ENV !== "production" ? MultiInputDateTimeRangeField.propTypes =
|
|
|
313
313
|
* Warning n°3: When used in strict mode, dayjs and moment require to respect the leading zeros.
|
|
314
314
|
* This mean that when using `shouldRespectLeadingZeros={false}`, if you retrieve the value directly from the input (not listening to `onChange`) and your format contains tokens without leading zeros, the value will not be parsed by your library.
|
|
315
315
|
*
|
|
316
|
-
* @default
|
|
316
|
+
* @default false
|
|
317
317
|
*/
|
|
318
318
|
shouldRespectLeadingZeros: _propTypes.default.bool,
|
|
319
319
|
/**
|
|
@@ -142,7 +142,7 @@ process.env.NODE_ENV !== "production" ? MultiInputTimeRangeField.propTypes = {
|
|
|
142
142
|
// ----------------------------------------------------------------------
|
|
143
143
|
/**
|
|
144
144
|
* 12h/24h view for hour selection clock.
|
|
145
|
-
* @default
|
|
145
|
+
* @default utils.is12HourCycleInCurrentLocale()
|
|
146
146
|
*/
|
|
147
147
|
ampm: _propTypes.default.bool,
|
|
148
148
|
/**
|
|
@@ -286,7 +286,7 @@ process.env.NODE_ENV !== "production" ? MultiInputTimeRangeField.propTypes = {
|
|
|
286
286
|
* Warning n°3: When used in strict mode, dayjs and moment require to respect the leading zeros.
|
|
287
287
|
* This mean that when using `shouldRespectLeadingZeros={false}`, if you retrieve the value directly from the input (not listening to `onChange`) and your format contains tokens without leading zeros, the value will not be parsed by your library.
|
|
288
288
|
*
|
|
289
|
-
* @default
|
|
289
|
+
* @default false
|
|
290
290
|
*/
|
|
291
291
|
shouldRespectLeadingZeros: _propTypes.default.bool,
|
|
292
292
|
/**
|
|
@@ -276,7 +276,7 @@ process.env.NODE_ENV !== "production" ? SingleInputDateRangeField.propTypes = {
|
|
|
276
276
|
* Warning n°3: When used in strict mode, dayjs and moment require to respect the leading zeros.
|
|
277
277
|
* This mean that when using `shouldRespectLeadingZeros={false}`, if you retrieve the value directly from the input (not listening to `onChange`) and your format contains tokens without leading zeros, the value will not be parsed by your library.
|
|
278
278
|
*
|
|
279
|
-
* @default
|
|
279
|
+
* @default false
|
|
280
280
|
*/
|
|
281
281
|
shouldRespectLeadingZeros: _propTypes.default.bool,
|
|
282
282
|
/**
|
|
@@ -74,7 +74,7 @@ process.env.NODE_ENV !== "production" ? SingleInputDateTimeRangeField.propTypes
|
|
|
74
74
|
// ----------------------------------------------------------------------
|
|
75
75
|
/**
|
|
76
76
|
* 12h/24h view for hour selection clock.
|
|
77
|
-
* @default
|
|
77
|
+
* @default utils.is12HourCycleInCurrentLocale()
|
|
78
78
|
*/
|
|
79
79
|
ampm: _propTypes.default.bool,
|
|
80
80
|
/**
|
|
@@ -317,7 +317,7 @@ process.env.NODE_ENV !== "production" ? SingleInputDateTimeRangeField.propTypes
|
|
|
317
317
|
* Warning n°3: When used in strict mode, dayjs and moment require to respect the leading zeros.
|
|
318
318
|
* This mean that when using `shouldRespectLeadingZeros={false}`, if you retrieve the value directly from the input (not listening to `onChange`) and your format contains tokens without leading zeros, the value will not be parsed by your library.
|
|
319
319
|
*
|
|
320
|
-
* @default
|
|
320
|
+
* @default false
|
|
321
321
|
*/
|
|
322
322
|
shouldRespectLeadingZeros: _propTypes.default.bool,
|
|
323
323
|
/**
|
|
@@ -74,7 +74,7 @@ process.env.NODE_ENV !== "production" ? SingleInputTimeRangeField.propTypes = {
|
|
|
74
74
|
// ----------------------------------------------------------------------
|
|
75
75
|
/**
|
|
76
76
|
* 12h/24h view for hour selection clock.
|
|
77
|
-
* @default
|
|
77
|
+
* @default utils.is12HourCycleInCurrentLocale()
|
|
78
78
|
*/
|
|
79
79
|
ampm: _propTypes.default.bool,
|
|
80
80
|
/**
|
|
@@ -290,7 +290,7 @@ process.env.NODE_ENV !== "production" ? SingleInputTimeRangeField.propTypes = {
|
|
|
290
290
|
* Warning n°3: When used in strict mode, dayjs and moment require to respect the leading zeros.
|
|
291
291
|
* This mean that when using `shouldRespectLeadingZeros={false}`, if you retrieve the value directly from the input (not listening to `onChange`) and your format contains tokens without leading zeros, the value will not be parsed by your library.
|
|
292
292
|
*
|
|
293
|
-
* @default
|
|
293
|
+
* @default false
|
|
294
294
|
*/
|
|
295
295
|
shouldRespectLeadingZeros: _propTypes.default.bool,
|
|
296
296
|
/**
|
|
@@ -83,7 +83,7 @@ StaticDateRangePicker.propTypes = {
|
|
|
83
83
|
* Formats the day of week displayed in the calendar header.
|
|
84
84
|
* @param {TDate} date The date of the day of week provided by the adapter.
|
|
85
85
|
* @returns {string} The name to display.
|
|
86
|
-
* @default (
|
|
86
|
+
* @default (date: TDate) => adapter.format(date, 'weekdayShort').charAt(0).toUpperCase()
|
|
87
87
|
*/
|
|
88
88
|
dayOfWeekFormatter: _propTypes.default.func,
|
|
89
89
|
/**
|
package/node/index.js
CHANGED
|
@@ -62,14 +62,14 @@ const useMultiInputFieldSlotProps = ({
|
|
|
62
62
|
event.stopPropagation();
|
|
63
63
|
onRangePositionChange('start');
|
|
64
64
|
if (!readOnly && !disableOpenPicker) {
|
|
65
|
-
actions.onOpen();
|
|
65
|
+
actions.onOpen(event);
|
|
66
66
|
}
|
|
67
67
|
};
|
|
68
68
|
const openRangeEndSelection = event => {
|
|
69
69
|
event.stopPropagation();
|
|
70
70
|
onRangePositionChange('end');
|
|
71
71
|
if (!readOnly && !disableOpenPicker) {
|
|
72
|
-
actions.onOpen();
|
|
72
|
+
actions.onOpen(event);
|
|
73
73
|
}
|
|
74
74
|
};
|
|
75
75
|
const handleFocusStart = () => {
|
|
@@ -206,7 +206,7 @@ const useSingleInputFieldSlotProps = ({
|
|
|
206
206
|
const openPicker = event => {
|
|
207
207
|
event.stopPropagation();
|
|
208
208
|
if (!readOnly && !disableOpenPicker) {
|
|
209
|
-
actions.onOpen();
|
|
209
|
+
actions.onOpen(event);
|
|
210
210
|
}
|
|
211
211
|
};
|
|
212
212
|
const slots = (0, _extends2.default)({}, fieldProps.slots, {
|
|
@@ -44,7 +44,7 @@ function calculateRangeChange({
|
|
|
44
44
|
nextSelection: 'end',
|
|
45
45
|
newRange: [selectedDate, null]
|
|
46
46
|
};
|
|
47
|
-
return Boolean(start) && utils.
|
|
47
|
+
return Boolean(start) && utils.isBeforeDay(selectedDate, start) ? truthyResult : {
|
|
48
48
|
nextSelection: 'start',
|
|
49
49
|
newRange: [start, selectedDate]
|
|
50
50
|
};
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.getReleaseInfo = void 0;
|
|
7
7
|
var _utils = require("@mui/utils");
|
|
8
8
|
const getReleaseInfo = () => {
|
|
9
|
-
const releaseInfo = "
|
|
9
|
+
const releaseInfo = "MTcxMjg2OTIwMDAwMA==";
|
|
10
10
|
if (process.env.NODE_ENV !== 'production') {
|
|
11
11
|
// A simple hack to set the value in the test environment (has no build step).
|
|
12
12
|
// eslint-disable-next-line no-useless-concat
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/x-date-pickers-pro",
|
|
3
|
-
"version": "7.
|
|
4
|
-
"description": "The
|
|
3
|
+
"version": "7.2.0",
|
|
4
|
+
"description": "The Pro plan edition of the Date and Time Picker components (MUI X).",
|
|
5
5
|
"author": "MUI Team",
|
|
6
6
|
"main": "./node/index.js",
|
|
7
7
|
"license": "SEE LICENSE IN LICENSE",
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"@mui/base": "^5.0.0-beta.40",
|
|
36
36
|
"@mui/system": "^5.15.14",
|
|
37
37
|
"@mui/utils": "^5.15.14",
|
|
38
|
-
"@mui/x-date-pickers": "7.
|
|
39
|
-
"@mui/x-license": "7.
|
|
38
|
+
"@mui/x-date-pickers": "7.2.0",
|
|
39
|
+
"@mui/x-license": "7.2.0",
|
|
40
40
|
"clsx": "^2.1.0",
|
|
41
41
|
"prop-types": "^15.8.1",
|
|
42
42
|
"react-transition-group": "^4.4.5"
|