@mui/x-date-pickers-pro 8.11.3 → 8.12.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.
Files changed (28) hide show
  1. package/CHANGELOG.md +151 -6
  2. package/DateRangeCalendar/DateRangeCalendar.js +1 -1
  3. package/DateRangePickerDay/DateRangePickerDay.js +1 -1
  4. package/DateTimeRangePicker/shared.d.ts +1 -0
  5. package/DateTimeRangePicker/shared.js +4 -0
  6. package/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.js +3 -1
  7. package/DesktopTimeRangePicker/DesktopTimeRangePicker.js +3 -1
  8. package/MobileDateTimeRangePicker/MobileDateTimeRangePicker.js +3 -1
  9. package/MobileTimeRangePicker/MobileTimeRangePicker.js +3 -1
  10. package/TimeRangePicker/shared.d.ts +1 -0
  11. package/TimeRangePicker/shared.js +4 -0
  12. package/esm/DateRangeCalendar/DateRangeCalendar.js +1 -1
  13. package/esm/DateRangePickerDay/DateRangePickerDay.js +1 -1
  14. package/esm/DateTimeRangePicker/shared.d.ts +1 -0
  15. package/esm/DateTimeRangePicker/shared.js +4 -0
  16. package/esm/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.js +3 -1
  17. package/esm/DesktopTimeRangePicker/DesktopTimeRangePicker.js +3 -1
  18. package/esm/MobileDateTimeRangePicker/MobileDateTimeRangePicker.js +3 -1
  19. package/esm/MobileTimeRangePicker/MobileTimeRangePicker.js +3 -1
  20. package/esm/TimeRangePicker/shared.d.ts +1 -0
  21. package/esm/TimeRangePicker/shared.js +4 -0
  22. package/esm/index.js +1 -1
  23. package/esm/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.js +1 -1
  24. package/esm/internals/hooks/useMobileRangePicker/useMobileRangePicker.js +1 -1
  25. package/index.js +1 -1
  26. package/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.js +1 -1
  27. package/internals/hooks/useMobileRangePicker/useMobileRangePicker.js +1 -1
  28. package/package.json +4 -4
package/CHANGELOG.md CHANGED
@@ -5,6 +5,151 @@
5
5
  All notable changes to this project will be documented in this file.
6
6
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
7
7
 
8
+ ## 8.12.0
9
+
10
+ _Sep 25, 2025_
11
+
12
+ We'd like to extend a big thank you to the 15 contributors who made this release possible. Here are some highlights ✨:
13
+
14
+ - 🤝 Grid-Charts integration
15
+
16
+ ![Grid x Charts](https://github.com/user-attachments/assets/0817c36f-f87f-4688-8f30-fa0db638ca8c)
17
+
18
+ 👉 [🎥 Watch the full video](https://github.com/user-attachments/assets/28f1848e-dc85-4077-8756-a3e88afd4e54)
19
+
20
+ - ⌨️ Charts keyboard navigation
21
+ - ⚡️ Charts: Add new `renderer="svg-batch"` prop to Scatter charts that provides improved performance for large datasets
22
+ - 🐞 Bugfixes
23
+ - 📚 Documentation improvements
24
+ - 🧰 Codemod requires Node >=20.19
25
+
26
+ `@mui/x-codemod` minimum supported Node version is `20.19`.
27
+ This was only the case due to using the v18 `yargs` package; this now explicitly aligns with it. (#18979)
28
+
29
+ Special thanks go out to the community members for their valuable contributions:
30
+ @deade1e, @sai6855, @thomas-mcdonald
31
+
32
+ The following are all team members who have contributed to this release:
33
+ @alexfauquette, @bernardobelchior, @flaviendelangle, @Janpot, @JCQuintas, @LukasTy, @michelengelen, @prakhargupta1, @rita-codes, @siriwatknp, @arminmeh, @romgrk
34
+
35
+ ### Data Grid
36
+
37
+ #### `@mui/x-data-grid@8.12.0`
38
+
39
+ - [DataGrid] Fix flex column width diff calculation while resizing (#19667) @arminmeh
40
+
41
+ #### `@mui/x-data-grid-pro@8.12.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
42
+
43
+ Same changes as in `@mui/x-data-grid@8.12.0`.
44
+
45
+ #### `@mui/x-data-grid-premium@8.12.0` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
46
+
47
+ Same changes as in `@mui/x-data-grid-pro@8.12.0`, plus:
48
+
49
+ - [DataGridPremium] Grid-Charts integration (#18021) @arminmeh
50
+ - [DataGridPremium] Fix sorting and filtering of the tree group columns with aggregation (#19607) @arminmeh
51
+ - [DataGridPremium] Disable aggregation on the grouping column by default (#19692) @arminmeh
52
+ - [DataGridPremium] Do not rely on the group separation constant to retrieve the column name for the charts panel (#19677) @arminmeh
53
+ - [DataGridPremium] Fix stale aggregation state (#19690) @arminmeh
54
+ - [DataGridPremium] Fix pivot column being hidden on autosizing (#19699) @cherniavskii
55
+
56
+ ### Date and Time Pickers
57
+
58
+ #### `@mui/x-date-pickers@8.12.0`
59
+
60
+ - [pickers] Ensure reference value is not updated for invalid values (#19635) @michelengelen
61
+ - [pickers] Fix `slotProps.textField.slotProps.htmlInput` resolution (#19713) @LukasTy
62
+ - [pickers] Preserve time format when using single column layout on Time Range Picker (#19626) @sai6855
63
+ - [pickers] Preserve time format when using single column layout on Date Time Picker and Date Time Range Picker (#19608) @sai6855
64
+
65
+ #### `@mui/x-date-pickers-pro@8.12.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
66
+
67
+ Same changes as in `@mui/x-date-pickers@8.12.0`.
68
+
69
+ ### Charts
70
+
71
+ #### `@mui/x-charts@8.12.0`
72
+
73
+ - [charts] Add batch renderer for scatter chart (#19075) @bernardobelchior
74
+ - [charts] Add renderer suffix to performance benchmarks (#19620) @bernardobelchior
75
+ - [charts] Document how plugins can be used (#19343) @alexfauquette
76
+ - [charts] Export chart plugins per series type (#19337) @alexfauquette
77
+ - [charts] Export plugins (#19335) @alexfauquette
78
+ - [charts] Fix horizontal layout and toolbar (#19655) @alexfauquette
79
+ - [charts] Fix performance issue with JS animations (#19606) @bernardobelchior
80
+ - [charts] Fix piecewise scale causing wrong colors in axis with min/max (#19610) @bernardobelchior
81
+ - [charts] Fix zoom discard inconsistency (#19535) @bernardobelchior
82
+ - [charts] Introduce keyboard navigation (#19155) @alexfauquette
83
+ - [charts] Refactor `getAxisExtremum` (#19627) @bernardobelchior
84
+ - [charts] Remove unused code path from `getAxisScale` (#19673) @bernardobelchior
85
+ - [charts] Make new hideLegend prop on ChartWrapper optional (#19694) @thomas-mcdonald
86
+ - [charts] Fix chart crash in test environment (#19711) @JCQuintas
87
+
88
+ #### `@mui/x-charts-pro@8.12.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
89
+
90
+ Same changes as in `@mui/x-charts@8.12.0`, plus:
91
+
92
+ - [charts-pro] Add `valueFormatter` to sankey (#19636) @JCQuintas
93
+ - [charts-pro] Allow `source/target` keywords in sankey link color (#19634) @JCQuintas
94
+ - [charts-pro] Allow exporting `SankeyChart` (#19659) @JCQuintas
95
+ - [charts-pro] Fix axis inversion when using axis `max` and `filterMode: 'discard'` (#19200) @bernardobelchior
96
+
97
+ #### `@mui/x-charts-premium@8.12.0` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
98
+
99
+ Same changes as in `@mui/x-charts-pro@8.12.0`, plus:
100
+
101
+ - [charts-premium] Grid-Charts integration (#18021) @arminmeh
102
+
103
+ ### Tree View
104
+
105
+ #### `@mui/x-tree-view@8.12.0`
106
+
107
+ - [tree view] Allow to pass `null` to the icon slots (#19569) @flaviendelangle
108
+ - [tree view] Fix `apiRef.current.isItemExpanded()` method (#19619) @flaviendelangle
109
+
110
+ #### `@mui/x-tree-view-pro@8.12.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
111
+
112
+ Same changes as in `@mui/x-tree-view@8.12.0`.
113
+
114
+ ### Codemod
115
+
116
+ #### `@mui/x-codemod@8.12.0`
117
+
118
+ - [codemod] Bump `engines.node` to `>=20.19` to align with `yargs` package (#18979) @LukasTy
119
+
120
+ ### Docs
121
+
122
+ - [docs] Add missing label to Charts example (#19616) @prakhargupta1
123
+ - [docs] Replace axis type and axis data with a table (#19618) @prakhargupta1
124
+ - [docs] Add Charts example collection page (#18353) @prakhargupta1
125
+ - [docs] Add a Charts demo showcasing bar and scatter composition (#19605) @prakhargupta1
126
+ - [docs] Add composition Charts demo for legends and tooltip (#19602) @prakhargupta1
127
+ - [docs] Add recipe about server-side data export (#19617) @siriwatknp
128
+ - [docs] Clarify DataGrid layout requirements (#19413) @romgrk
129
+ - [docs] Fix `ExportServerSideData` demo layout shift (#19669) @siriwatknp
130
+ - [docs] Improve server-side `updateRow()` description (#19554) @deade1e
131
+ - [docs] Show how to customize drawing area background (#19682) @alexfauquette
132
+ - [docs] Add hook documentation pages (#19334) @Copilot
133
+
134
+ ### Core
135
+
136
+ - [code-infra] Add copilot instructions specific to x repo (#19623) @JCQuintas
137
+ - [code-infra] Load `tsx` files in visual regression (#19595) @JCQuintas
138
+ - [code-infra] Remove renovate automerge (#19501) @Janpot
139
+ - [code-infra] Update `DEFAULT_TIMESTAMP` format to ISO 8601 (#19624) @Janpot
140
+ - [code-infra] Update `findLatestTaggedVersion` to filter tags based on major version (#19693) @michelengelen
141
+ - [code-infra] Fix changelog generation for charts premium (#19701) @JCQuintas
142
+ - [code-infra] Run prettier on `createReleasePR.mjs` (#19702) @bernardobelchior
143
+ - [code-infra] Make `x-charts-premium` releasable (#18959) @JCQuintas
144
+ - [docs-infra] Ensure `create-playground` script only runs if target file is absent (#19603) @michelengelen
145
+ - [docs-infra] Add @prakhargupta1 as a codeowner of the docs (#19679) @alexfauquette
146
+
147
+ ### Miscellaneous
148
+
149
+ - [test] Reduce time for wheel zoom test (#19571) @alexfauquette
150
+ - Change `matchPackageNames` to `matchDepNames` for date-fns-v2 @Janpot
151
+ - Remove groupName for date-fns-v2 in renovate.json @Janpot
152
+
8
153
  ## 8.11.3
9
154
 
10
155
  _Sep 16, 2025_
@@ -27,11 +172,11 @@ The following are all team members who have contributed to this release:
27
172
  - [DataGrid] Fix numeric font size not being applied (#19552) @cherniavskii
28
173
  - [DataGrid] Improve `operator` types to display literal values (#19529) @siriwatknp
29
174
 
30
- #### `@mui/x-data-grid-pro@8.11.3` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link "Pro plan")
175
+ #### `@mui/x-data-grid-pro@8.11.3` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
31
176
 
32
177
  Same changes as in `@mui/x-data-grid@8.11.3`.
33
178
 
34
- #### `@mui/x-data-grid-premium@8.11.3` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link "Premium plan")
179
+ #### `@mui/x-data-grid-premium@8.11.3` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
35
180
 
36
181
  Same changes as in `@mui/x-data-grid-pro@8.11.3`.
37
182
 
@@ -41,7 +186,7 @@ Same changes as in `@mui/x-data-grid-pro@8.11.3`.
41
186
 
42
187
  - [pickers] Refactor `slots` and `slotProps` propagation strategy (#18867) @LukasTy
43
188
 
44
- #### `@mui/x-date-pickers-pro@8.11.3` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link "Pro plan")
189
+ #### `@mui/x-date-pickers-pro@8.11.3` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
45
190
 
46
191
  Same changes as in `@mui/x-date-pickers@8.11.3`.
47
192
 
@@ -55,7 +200,7 @@ Same changes as in `@mui/x-date-pickers@8.11.3`.
55
200
  - [charts] Rename `isBandScale` to `isDiscreteScale` (#19514) @bernardobelchior
56
201
  - [charts] Fix legend position affecting toolbar's position (#19257) @sai6855
57
202
 
58
- #### `@mui/x-charts-pro@8.11.3` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link "Pro plan")
203
+ #### `@mui/x-charts-pro@8.11.3` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
59
204
 
60
205
  Same changes as in `@mui/x-charts@8.11.3`, plus:
61
206
 
@@ -69,7 +214,7 @@ Same changes as in `@mui/x-charts@8.11.3`, plus:
69
214
  - [tree view] Support flat DOM structure (#19350) @flaviendelangle
70
215
  - [tree view] Update cursor styles for disabled TreeItem (#19548) @sai6855
71
216
 
72
- #### `@mui/x-tree-view-pro@8.11.3` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link "Pro plan")
217
+ #### `@mui/x-tree-view-pro@8.11.3` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
73
218
 
74
219
  Same changes as in `@mui/x-tree-view@8.11.3`.
75
220
 
@@ -83,7 +228,7 @@ Internal changes.
83
228
 
84
229
  - [docs] Add styling row group recipe (#19349) @siriwatknp
85
230
  - [docs] Group demos data into the dataset folder (#19549) @alexfauquette
86
- - [docs] Add `shiny` bar chart example at the top (#19416) @JCQuintas
231
+ - [docs] Add `shiny` bar chart example at the top (#19416) @JCQuintas
87
232
 
88
233
  ### Core
89
234
 
@@ -37,7 +37,7 @@ var _DateRangePickerDay2 = require("../DateRangePickerDay2");
37
37
  var _jsxRuntime = require("react/jsx-runtime");
38
38
  const _excluded = ["value", "defaultValue", "referenceDate", "onChange", "className", "classes", "disableFuture", "disablePast", "minDate", "maxDate", "shouldDisableDate", "reduceAnimations", "onMonthChange", "rangePosition", "defaultRangePosition", "onRangePositionChange", "calendars", "currentMonthCalendarPosition", "slots", "slotProps", "loading", "renderLoading", "disableHighlightToday", "focusedView", "onFocusedViewChange", "readOnly", "disabled", "showDaysOutsideCurrentMonth", "dayOfWeekFormatter", "disableAutoMonthSwitching", "autoFocus", "fixedWeekNumber", "disableDragEditing", "displayWeekNumber", "timezone", "availableRangePositions", "views", "view", "openTo", "onViewChange"],
39
39
  _excluded2 = ["isDragging", "rangeDragDay", "draggingDatePosition"];
40
- const releaseInfo = "MTc1ODA2NzIwMDAwMA==";
40
+ const releaseInfo = "MTc1ODc1MTIwMDAwMA==";
41
41
  const DateRangeCalendarRoot = (0, _styles.styled)('div', {
42
42
  name: 'MuiDateRangeCalendar',
43
43
  slot: 'Root'
@@ -235,7 +235,7 @@ const DateRangePickerDayRaw = /*#__PURE__*/React.forwardRef(function DateRangePi
235
235
  showDaysOutsideCurrentMonth
236
236
  } = props,
237
237
  other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
238
- (0, _xLicense.useLicenseVerifier)('x-date-pickers-pro', "MTc1ODA2NzIwMDAwMA==");
238
+ (0, _xLicense.useLicenseVerifier)('x-date-pickers-pro', "MTc1ODc1MTIwMDAwMA==");
239
239
  const adapter = (0, _hooks.usePickerAdapter)();
240
240
  const shouldRenderHighlight = isHighlighting && !outsideCurrentMonth;
241
241
  const shouldRenderPreview = isPreviewing && !outsideCurrentMonth;
@@ -58,6 +58,7 @@ export interface BaseDateTimeRangePickerProps extends Omit<BasePickerInputProps<
58
58
  type UseDateTimeRangePickerDefaultizedProps<Props extends BaseDateTimeRangePickerProps> = LocalizedComponent<Omit<DefaultizedProps<Props, 'openTo' | 'ampm' | ValidateDateTimeRangePropsToDefault>, 'views'>> & {
59
59
  shouldRenderTimeInASingleColumn: boolean;
60
60
  views: readonly DateTimeRangePickerView[];
61
+ viewsForFormatting: readonly DateOrTimeViewWithMeridiem[];
61
62
  };
62
63
  export declare function useDateTimeRangePickerDefaultizedProps<Props extends BaseDateTimeRangePickerProps>(props: Props, name: string): UseDateTimeRangePickerDefaultizedProps<Props>;
63
64
  export {};
@@ -39,12 +39,16 @@ function useDateTimeRangePickerDefaultizedProps(props, name) {
39
39
  timeSteps: themeProps.timeSteps,
40
40
  views: defaultViews
41
41
  });
42
+
43
+ // Keep the original views for format calculation (before filtering)
44
+ const viewsForFormatting = ampm ? [...defaultViews, 'meridiem'] : defaultViews;
42
45
  return (0, _extends2.default)({}, themeProps, validationProps, {
43
46
  timeSteps,
44
47
  openTo,
45
48
  shouldRenderTimeInASingleColumn,
46
49
  thresholdToRenderTimeInASingleColumn,
47
50
  views,
51
+ viewsForFormatting,
48
52
  ampm,
49
53
  slots: (0, _extends2.default)({
50
54
  tabs: _DateTimeRangePickerTabs.DateTimeRangePickerTabs,
@@ -122,7 +122,9 @@ const DesktopDateTimeRangePicker = exports.DesktopDateTimeRangePicker = /*#__PUR
122
122
  const props = (0, _extends2.default)({}, defaultizedProps, {
123
123
  views,
124
124
  viewRenderers,
125
- format: (0, _internals.resolveDateTimeFormat)(adapter, defaultizedProps, true),
125
+ format: (0, _internals.resolveDateTimeFormat)(adapter, (0, _extends2.default)({}, defaultizedProps, {
126
+ views: defaultizedProps.viewsForFormatting
127
+ }), true),
126
128
  // force true to correctly handle `renderTimeViewClock` as a renderer
127
129
  ampmInClock: true,
128
130
  calendars: defaultizedProps.calendars ?? 1,
@@ -87,7 +87,9 @@ const DesktopTimeRangePicker = exports.DesktopTimeRangePicker = /*#__PURE__*/Rea
87
87
  views,
88
88
  viewRenderers,
89
89
  ampmInClock: true,
90
- format: (0, _internals.resolveTimeFormat)(adapter, defaultizedProps),
90
+ format: (0, _internals.resolveTimeFormat)(adapter, (0, _extends2.default)({}, defaultizedProps, {
91
+ views: defaultizedProps.viewsForFormatting
92
+ })),
91
93
  slots: (0, _extends2.default)({
92
94
  field: _SingleInputTimeRangeField.SingleInputTimeRangeField
93
95
  }, defaultizedProps.slots),
@@ -125,7 +125,9 @@ const MobileDateTimeRangePicker = exports.MobileDateTimeRangePicker = /*#__PURE_
125
125
  }, defaultizedProps.viewRenderers);
126
126
  const props = (0, _extends2.default)({}, defaultizedProps, {
127
127
  viewRenderers,
128
- format: (0, _internals.resolveDateTimeFormat)(adapter, defaultizedProps, true),
128
+ format: (0, _internals.resolveDateTimeFormat)(adapter, (0, _extends2.default)({}, defaultizedProps, {
129
+ views: defaultizedProps.viewsForFormatting
130
+ }), true),
129
131
  // Force one calendar on mobile to avoid layout issues
130
132
  calendars: 1,
131
133
  // force true to correctly handle `renderTimeViewClock` as a renderer
@@ -85,7 +85,9 @@ const MobileTimeRangePicker = exports.MobileTimeRangePicker = /*#__PURE__*/React
85
85
  const props = (0, _extends2.default)({}, defaultizedProps, {
86
86
  ampmInClock: true,
87
87
  viewRenderers,
88
- format: (0, _internals.resolveTimeFormat)(adapter, defaultizedProps),
88
+ format: (0, _internals.resolveTimeFormat)(adapter, (0, _extends2.default)({}, defaultizedProps, {
89
+ views: defaultizedProps.viewsForFormatting
90
+ })),
89
91
  slots: (0, _extends2.default)({
90
92
  field: _SingleInputTimeRangeField.SingleInputTimeRangeField
91
93
  }, defaultizedProps.slots),
@@ -68,6 +68,7 @@ export interface BaseTimeRangePickerProps extends Omit<BasePickerInputProps<Pick
68
68
  type UseTimeRangePickerDefaultizedProps<Props extends BaseTimeRangePickerProps> = LocalizedComponent<Omit<DefaultizedProps<Props, 'views' | 'openTo' | 'ampm' | keyof BaseTimeValidationProps>, 'views'>> & {
69
69
  shouldRenderTimeInASingleColumn: boolean;
70
70
  views: readonly TimeViewWithMeridiem[];
71
+ viewsForFormatting: readonly TimeViewWithMeridiem[];
71
72
  };
72
73
  export declare function useTimeRangePickerDefaultizedProps<Props extends BaseTimeRangePickerProps>(props: Props, name: string): UseTimeRangePickerDefaultizedProps<Props>;
73
74
  export {};
@@ -49,6 +49,9 @@ function useTimeRangePickerDefaultizedProps(props, name) {
49
49
  timeSteps: themeProps.timeSteps,
50
50
  views: defaultViews
51
51
  });
52
+
53
+ // Keep the original views for format calculation (before filtering)
54
+ const viewsForFormatting = ampm ? [...defaultViews, 'meridiem'] : defaultViews;
52
55
  return (0, _extends2.default)({}, themeProps, validationProps, {
53
56
  localeText,
54
57
  timeSteps,
@@ -56,6 +59,7 @@ function useTimeRangePickerDefaultizedProps(props, name) {
56
59
  shouldRenderTimeInASingleColumn,
57
60
  thresholdToRenderTimeInASingleColumn,
58
61
  views,
62
+ viewsForFormatting,
59
63
  ampm,
60
64
  slots: (0, _extends2.default)({
61
65
  tabs: _TimeRangePickerTabs.TimeRangePickerTabs,
@@ -30,7 +30,7 @@ import { PickersRangeCalendarHeader } from "../PickersRangeCalendarHeader/index.
30
30
  import { useNullablePickerRangePositionContext } from "../internals/hooks/useNullablePickerRangePositionContext.js";
31
31
  import { dateRangePickerDay2Classes } from "../DateRangePickerDay2/index.js";
32
32
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
33
- const releaseInfo = "MTc1ODA2NzIwMDAwMA==";
33
+ const releaseInfo = "MTc1ODc1MTIwMDAwMA==";
34
34
  const DateRangeCalendarRoot = styled('div', {
35
35
  name: 'MuiDateRangeCalendar',
36
36
  slot: 'Root'
@@ -228,7 +228,7 @@ const DateRangePickerDayRaw = /*#__PURE__*/React.forwardRef(function DateRangePi
228
228
  showDaysOutsideCurrentMonth
229
229
  } = props,
230
230
  other = _objectWithoutPropertiesLoose(props, _excluded);
231
- useLicenseVerifier('x-date-pickers-pro', "MTc1ODA2NzIwMDAwMA==");
231
+ useLicenseVerifier('x-date-pickers-pro', "MTc1ODc1MTIwMDAwMA==");
232
232
  const adapter = usePickerAdapter();
233
233
  const shouldRenderHighlight = isHighlighting && !outsideCurrentMonth;
234
234
  const shouldRenderPreview = isPreviewing && !outsideCurrentMonth;
@@ -58,6 +58,7 @@ export interface BaseDateTimeRangePickerProps extends Omit<BasePickerInputProps<
58
58
  type UseDateTimeRangePickerDefaultizedProps<Props extends BaseDateTimeRangePickerProps> = LocalizedComponent<Omit<DefaultizedProps<Props, 'openTo' | 'ampm' | ValidateDateTimeRangePropsToDefault>, 'views'>> & {
59
59
  shouldRenderTimeInASingleColumn: boolean;
60
60
  views: readonly DateTimeRangePickerView[];
61
+ viewsForFormatting: readonly DateOrTimeViewWithMeridiem[];
61
62
  };
62
63
  export declare function useDateTimeRangePickerDefaultizedProps<Props extends BaseDateTimeRangePickerProps>(props: Props, name: string): UseDateTimeRangePickerDefaultizedProps<Props>;
63
64
  export {};
@@ -32,12 +32,16 @@ export function useDateTimeRangePickerDefaultizedProps(props, name) {
32
32
  timeSteps: themeProps.timeSteps,
33
33
  views: defaultViews
34
34
  });
35
+
36
+ // Keep the original views for format calculation (before filtering)
37
+ const viewsForFormatting = ampm ? [...defaultViews, 'meridiem'] : defaultViews;
35
38
  return _extends({}, themeProps, validationProps, {
36
39
  timeSteps,
37
40
  openTo,
38
41
  shouldRenderTimeInASingleColumn,
39
42
  thresholdToRenderTimeInASingleColumn,
40
43
  views,
44
+ viewsForFormatting,
41
45
  ampm,
42
46
  slots: _extends({
43
47
  tabs: DateTimeRangePickerTabs,
@@ -115,7 +115,9 @@ const DesktopDateTimeRangePicker = /*#__PURE__*/React.forwardRef(function Deskto
115
115
  const props = _extends({}, defaultizedProps, {
116
116
  views,
117
117
  viewRenderers,
118
- format: resolveDateTimeFormat(adapter, defaultizedProps, true),
118
+ format: resolveDateTimeFormat(adapter, _extends({}, defaultizedProps, {
119
+ views: defaultizedProps.viewsForFormatting
120
+ }), true),
119
121
  // force true to correctly handle `renderTimeViewClock` as a renderer
120
122
  ampmInClock: true,
121
123
  calendars: defaultizedProps.calendars ?? 1,
@@ -80,7 +80,9 @@ const DesktopTimeRangePicker = /*#__PURE__*/React.forwardRef(function DesktopTim
80
80
  views,
81
81
  viewRenderers,
82
82
  ampmInClock: true,
83
- format: resolveTimeFormat(adapter, defaultizedProps),
83
+ format: resolveTimeFormat(adapter, _extends({}, defaultizedProps, {
84
+ views: defaultizedProps.viewsForFormatting
85
+ })),
84
86
  slots: _extends({
85
87
  field: SingleInputTimeRangeField
86
88
  }, defaultizedProps.slots),
@@ -118,7 +118,9 @@ const MobileDateTimeRangePicker = /*#__PURE__*/React.forwardRef(function MobileD
118
118
  }, defaultizedProps.viewRenderers);
119
119
  const props = _extends({}, defaultizedProps, {
120
120
  viewRenderers,
121
- format: resolveDateTimeFormat(adapter, defaultizedProps, true),
121
+ format: resolveDateTimeFormat(adapter, _extends({}, defaultizedProps, {
122
+ views: defaultizedProps.viewsForFormatting
123
+ }), true),
122
124
  // Force one calendar on mobile to avoid layout issues
123
125
  calendars: 1,
124
126
  // force true to correctly handle `renderTimeViewClock` as a renderer
@@ -78,7 +78,9 @@ const MobileTimeRangePicker = /*#__PURE__*/React.forwardRef(function MobileTimeR
78
78
  const props = _extends({}, defaultizedProps, {
79
79
  ampmInClock: true,
80
80
  viewRenderers,
81
- format: resolveTimeFormat(adapter, defaultizedProps),
81
+ format: resolveTimeFormat(adapter, _extends({}, defaultizedProps, {
82
+ views: defaultizedProps.viewsForFormatting
83
+ })),
82
84
  slots: _extends({
83
85
  field: SingleInputTimeRangeField
84
86
  }, defaultizedProps.slots),
@@ -68,6 +68,7 @@ export interface BaseTimeRangePickerProps extends Omit<BasePickerInputProps<Pick
68
68
  type UseTimeRangePickerDefaultizedProps<Props extends BaseTimeRangePickerProps> = LocalizedComponent<Omit<DefaultizedProps<Props, 'views' | 'openTo' | 'ampm' | keyof BaseTimeValidationProps>, 'views'>> & {
69
69
  shouldRenderTimeInASingleColumn: boolean;
70
70
  views: readonly TimeViewWithMeridiem[];
71
+ viewsForFormatting: readonly TimeViewWithMeridiem[];
71
72
  };
72
73
  export declare function useTimeRangePickerDefaultizedProps<Props extends BaseTimeRangePickerProps>(props: Props, name: string): UseTimeRangePickerDefaultizedProps<Props>;
73
74
  export {};
@@ -41,6 +41,9 @@ export function useTimeRangePickerDefaultizedProps(props, name) {
41
41
  timeSteps: themeProps.timeSteps,
42
42
  views: defaultViews
43
43
  });
44
+
45
+ // Keep the original views for format calculation (before filtering)
46
+ const viewsForFormatting = ampm ? [...defaultViews, 'meridiem'] : defaultViews;
44
47
  return _extends({}, themeProps, validationProps, {
45
48
  localeText,
46
49
  timeSteps,
@@ -48,6 +51,7 @@ export function useTimeRangePickerDefaultizedProps(props, name) {
48
51
  shouldRenderTimeInASingleColumn,
49
52
  thresholdToRenderTimeInASingleColumn,
50
53
  views,
54
+ viewsForFormatting,
51
55
  ampm,
52
56
  slots: _extends({
53
57
  tabs: TimeRangePickerTabs,
package/esm/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-date-pickers-pro v8.11.3
2
+ * @mui/x-date-pickers-pro v8.12.0
3
3
  *
4
4
  * @license SEE LICENSE IN LICENSE
5
5
  * This source code is licensed under the SEE LICENSE IN LICENSE license found in the
@@ -19,7 +19,7 @@ export const useDesktopRangePicker = _ref => {
19
19
  steps
20
20
  } = _ref,
21
21
  pickerParams = _objectWithoutPropertiesLoose(_ref, _excluded);
22
- useLicenseVerifier('x-date-pickers-pro', "MTc1ODA2NzIwMDAwMA==");
22
+ useLicenseVerifier('x-date-pickers-pro', "MTc1ODc1MTIwMDAwMA==");
23
23
  const {
24
24
  slots,
25
25
  slotProps,
@@ -21,7 +21,7 @@ export const useMobileRangePicker = _ref => {
21
21
  steps
22
22
  } = _ref,
23
23
  pickerParams = _objectWithoutPropertiesLoose(_ref, _excluded);
24
- useLicenseVerifier('x-date-pickers-pro', "MTc1ODA2NzIwMDAwMA==");
24
+ useLicenseVerifier('x-date-pickers-pro', "MTc1ODc1MTIwMDAwMA==");
25
25
  const {
26
26
  slots,
27
27
  slotProps: innerSlotProps,
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-date-pickers-pro v8.11.3
2
+ * @mui/x-date-pickers-pro v8.12.0
3
3
  *
4
4
  * @license SEE LICENSE IN LICENSE
5
5
  * This source code is licensed under the SEE LICENSE IN LICENSE license found in the
@@ -27,7 +27,7 @@ const useDesktopRangePicker = _ref => {
27
27
  steps
28
28
  } = _ref,
29
29
  pickerParams = (0, _objectWithoutPropertiesLoose2.default)(_ref, _excluded);
30
- (0, _xLicense.useLicenseVerifier)('x-date-pickers-pro', "MTc1ODA2NzIwMDAwMA==");
30
+ (0, _xLicense.useLicenseVerifier)('x-date-pickers-pro', "MTc1ODc1MTIwMDAwMA==");
31
31
  const {
32
32
  slots,
33
33
  slotProps,
@@ -29,7 +29,7 @@ const useMobileRangePicker = _ref => {
29
29
  steps
30
30
  } = _ref,
31
31
  pickerParams = (0, _objectWithoutPropertiesLoose2.default)(_ref, _excluded);
32
- (0, _xLicense.useLicenseVerifier)('x-date-pickers-pro', "MTc1ODA2NzIwMDAwMA==");
32
+ (0, _xLicense.useLicenseVerifier)('x-date-pickers-pro', "MTc1ODc1MTIwMDAwMA==");
33
33
  const {
34
34
  slots,
35
35
  slotProps: innerSlotProps,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/x-date-pickers-pro",
3
- "version": "8.11.3",
3
+ "version": "8.12.0",
4
4
  "author": "MUI Team",
5
5
  "description": "The Pro plan edition of the MUI X Date and Time Picker components.",
6
6
  "license": "SEE LICENSE IN LICENSE",
@@ -35,9 +35,9 @@
35
35
  "clsx": "^2.1.1",
36
36
  "prop-types": "^15.8.1",
37
37
  "react-transition-group": "^4.4.5",
38
- "@mui/x-date-pickers": "8.11.3",
39
- "@mui/x-internals": "8.11.3",
40
- "@mui/x-license": "8.11.3"
38
+ "@mui/x-internals": "8.12.0",
39
+ "@mui/x-date-pickers": "8.12.0",
40
+ "@mui/x-license": "8.12.0"
41
41
  },
42
42
  "peerDependencies": {
43
43
  "@emotion/react": "^11.9.0",