@mui/x-date-pickers-pro 7.0.0-beta.6 → 7.0.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 (107) hide show
  1. package/CHANGELOG.md +311 -12
  2. package/DateRangeCalendar/DateRangeCalendar.js +34 -74
  3. package/DateRangeCalendar/DateRangeCalendar.types.d.ts +3 -2
  4. package/DateRangeCalendar/useDragRange.js +1 -2
  5. package/DateRangePicker/DateRangePicker.js +1 -1
  6. package/DateRangePicker/shared.js +3 -5
  7. package/DateTimeRangePicker/DateTimeRangePicker.d.ts +10 -0
  8. package/DateTimeRangePicker/DateTimeRangePicker.js +11 -1
  9. package/DateTimeRangePicker/DateTimeRangePickerTimeWrapper.d.ts +4 -5
  10. package/DateTimeRangePicker/DateTimeRangePickerTimeWrapper.js +2 -3
  11. package/DateTimeRangePicker/DateTimeRangePickerToolbar.js +2 -2
  12. package/DateTimeRangePicker/shared.d.ts +5 -4
  13. package/DateTimeRangePicker/shared.js +9 -10
  14. package/DesktopDateRangePicker/DesktopDateRangePicker.js +6 -10
  15. package/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.d.ts +10 -0
  16. package/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.js +31 -28
  17. package/MobileDateRangePicker/MobileDateRangePicker.js +5 -9
  18. package/MobileDateTimeRangePicker/MobileDateTimeRangePicker.d.ts +10 -0
  19. package/MobileDateTimeRangePicker/MobileDateTimeRangePicker.js +20 -14
  20. package/MultiInputDateRangeField/MultiInputDateRangeField.js +21 -17
  21. package/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +21 -17
  22. package/MultiInputTimeRangeField/MultiInputTimeRangeField.js +20 -16
  23. package/PickersRangeCalendarHeader/PickersRangeCalendarHeader.d.ts +8 -0
  24. package/PickersRangeCalendarHeader/PickersRangeCalendarHeader.js +124 -0
  25. package/PickersRangeCalendarHeader/PickersRangeCalendarHeader.types.d.ts +18 -0
  26. package/PickersRangeCalendarHeader/PickersRangeCalendarHeader.types.js +1 -0
  27. package/PickersRangeCalendarHeader/index.d.ts +2 -0
  28. package/PickersRangeCalendarHeader/index.js +1 -0
  29. package/PickersRangeCalendarHeader/package.json +6 -0
  30. package/README.md +1 -1
  31. package/SingleInputDateRangeField/SingleInputDateRangeField.js +8 -4
  32. package/SingleInputDateRangeField/useSingleInputDateRangeField.js +6 -2
  33. package/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +8 -4
  34. package/SingleInputDateTimeRangeField/useSingleInputDateTimeRangeField.js +6 -2
  35. package/SingleInputTimeRangeField/SingleInputTimeRangeField.js +7 -3
  36. package/SingleInputTimeRangeField/useSingleInputTimeRangeField.js +6 -2
  37. package/StaticDateRangePicker/StaticDateRangePicker.js +4 -5
  38. package/index.d.ts +1 -0
  39. package/index.js +2 -1
  40. package/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.js +9 -11
  41. package/internals/hooks/useEnrichedRangePickerFieldProps.js +25 -31
  42. package/internals/hooks/useMobileRangePicker/useMobileRangePicker.js +9 -10
  43. package/internals/hooks/useMultiInputFieldSelectedSections.js +3 -6
  44. package/internals/hooks/useRangePosition.js +3 -5
  45. package/internals/hooks/useStaticRangePicker/useStaticRangePicker.js +14 -18
  46. package/internals/models/dateRange.d.ts +3 -3
  47. package/internals/models/dateTimeRange.d.ts +2 -2
  48. package/internals/models/timeRange.d.ts +2 -2
  49. package/internals/utils/releaseInfo.js +1 -1
  50. package/internals/utils/validation/validateDateRange.js +2 -2
  51. package/internals/utils/validation/validateDateTimeRange.js +2 -2
  52. package/internals/utils/valueManagers.d.ts +3 -1
  53. package/internals/utils/valueManagers.js +9 -7
  54. package/models/fields.d.ts +8 -1
  55. package/modern/DateRangeCalendar/DateRangeCalendar.js +40 -72
  56. package/modern/DateRangePicker/DateRangePicker.js +1 -1
  57. package/modern/DateTimeRangePicker/DateTimeRangePicker.js +11 -1
  58. package/modern/DesktopDateRangePicker/DesktopDateRangePicker.js +1 -1
  59. package/modern/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.js +20 -9
  60. package/modern/MobileDateRangePicker/MobileDateRangePicker.js +1 -1
  61. package/modern/MobileDateTimeRangePicker/MobileDateTimeRangePicker.js +15 -5
  62. package/modern/MultiInputDateRangeField/MultiInputDateRangeField.js +14 -6
  63. package/modern/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +14 -6
  64. package/modern/MultiInputTimeRangeField/MultiInputTimeRangeField.js +13 -5
  65. package/modern/PickersRangeCalendarHeader/PickersRangeCalendarHeader.js +124 -0
  66. package/modern/PickersRangeCalendarHeader/PickersRangeCalendarHeader.types.js +1 -0
  67. package/modern/PickersRangeCalendarHeader/index.js +1 -0
  68. package/modern/SingleInputDateRangeField/SingleInputDateRangeField.js +6 -1
  69. package/modern/SingleInputDateRangeField/useSingleInputDateRangeField.js +6 -2
  70. package/modern/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +6 -1
  71. package/modern/SingleInputDateTimeRangeField/useSingleInputDateTimeRangeField.js +6 -2
  72. package/modern/SingleInputTimeRangeField/SingleInputTimeRangeField.js +5 -0
  73. package/modern/SingleInputTimeRangeField/useSingleInputTimeRangeField.js +6 -2
  74. package/modern/StaticDateRangePicker/StaticDateRangePicker.js +1 -1
  75. package/modern/index.js +2 -1
  76. package/modern/internals/utils/releaseInfo.js +1 -1
  77. package/modern/internals/utils/valueManagers.js +7 -5
  78. package/node/DateRangeCalendar/DateRangeCalendar.js +39 -71
  79. package/node/DateRangePicker/DateRangePicker.js +1 -1
  80. package/node/DateTimeRangePicker/DateTimeRangePicker.js +11 -1
  81. package/node/DesktopDateRangePicker/DesktopDateRangePicker.js +1 -1
  82. package/node/DesktopDateTimeRangePicker/DesktopDateTimeRangePicker.js +20 -9
  83. package/node/MobileDateRangePicker/MobileDateRangePicker.js +1 -1
  84. package/node/MobileDateTimeRangePicker/MobileDateTimeRangePicker.js +15 -5
  85. package/node/MultiInputDateRangeField/MultiInputDateRangeField.js +14 -6
  86. package/node/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +14 -6
  87. package/node/MultiInputTimeRangeField/MultiInputTimeRangeField.js +13 -5
  88. package/node/PickersRangeCalendarHeader/PickersRangeCalendarHeader.js +132 -0
  89. package/node/PickersRangeCalendarHeader/PickersRangeCalendarHeader.types.js +5 -0
  90. package/node/PickersRangeCalendarHeader/index.js +12 -0
  91. package/node/SingleInputDateRangeField/SingleInputDateRangeField.js +6 -1
  92. package/node/SingleInputDateRangeField/useSingleInputDateRangeField.js +7 -1
  93. package/node/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +6 -1
  94. package/node/SingleInputDateTimeRangeField/useSingleInputDateTimeRangeField.js +7 -1
  95. package/node/SingleInputTimeRangeField/SingleInputTimeRangeField.js +5 -0
  96. package/node/SingleInputTimeRangeField/useSingleInputTimeRangeField.js +7 -1
  97. package/node/StaticDateRangePicker/StaticDateRangePicker.js +1 -1
  98. package/node/index.js +13 -1
  99. package/node/internals/utils/releaseInfo.js +1 -1
  100. package/node/internals/utils/valueManagers.js +9 -6
  101. package/package.json +7 -7
  102. package/themeAugmentation/components.d.ts +3 -0
  103. package/themeAugmentation/props.d.ts +2 -0
  104. package/DesktopDateTimeRangePicker/DesktopDateTimeRangePickerLayout.d.ts +0 -9
  105. package/DesktopDateTimeRangePicker/DesktopDateTimeRangePickerLayout.js +0 -52
  106. package/modern/DesktopDateTimeRangePicker/DesktopDateTimeRangePickerLayout.js +0 -51
  107. package/node/DesktopDateTimeRangePicker/DesktopDateTimeRangePickerLayout.js +0 -59
package/CHANGELOG.md CHANGED
@@ -3,6 +3,285 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## v7.0.0
7
+
8
+ _Mar 22, 2024_
9
+
10
+ We're excited to [announce the first v7 stable release](https://mui.com/blog/mui-x-v7/)! 🎉🚀
11
+
12
+ This is now the officially supported major version, where we'll keep rolling out new features, bug fixes, and improvements.
13
+ Migration guides are available with a complete list of the breaking changes:
14
+
15
+ - [Data Grid](https://mui.com/x/migration/migration-data-grid-v6/)
16
+ - [Date and Time Pickers](https://mui.com/x/migration/migration-pickers-v6/)
17
+ - [Tree View](https://mui.com/x/migration/migration-tree-view-v6/)
18
+ - [Charts](https://mui.com/x/migration/migration-charts-v6/)
19
+
20
+ We'd like to offer a big thanks to the 12 contributors who made this release possible. Here are some highlights ✨:
21
+
22
+ - 🚀 Improve the usage of custom `viewRenderers` on `DateTimePicker` (#12441) @LukasTy
23
+ - ✨ Set focus on the focused Tree Item instead of the Tree View (#12226) @flaviendelangle
24
+ - 🕹️ Support controlled `density` for the Data Grid (#12332) @MBilalShafi
25
+ - 🎁 Dynamic virtualization range for the Data Grid (#12353) @romgrk
26
+ - 🐞 Bugfixes
27
+ - 📚 Documentation improvements
28
+
29
+ ### Data Grid
30
+
31
+ #### Breaking changes
32
+
33
+ - The `density` is a [controlled prop](https://mui.com/x/react-data-grid/accessibility/#set-the-density-programmatically) now, if you were previously passing the `density` prop to the Data Grid, you will need to do one of the following:
34
+
35
+ 1. Move it to the `initialState.density` to initialize it.
36
+
37
+ ```diff
38
+ <DataGrid
39
+ - density="compact"
40
+ + initialState={{ density: "compact" }}
41
+ />
42
+ ```
43
+
44
+ 2. Move it to the state and use `onDensityChange` callback to update the `density` prop accordingly for it to work as expected.
45
+
46
+ ```diff
47
+ + const [density, setDensity] = React.useState<GridDensity>('compact');
48
+ <DataGrid
49
+ - density="compact"
50
+ + density={density}
51
+ + onDensityChange={(newDensity) => setDensity(newDensity)}
52
+ />
53
+ ```
54
+
55
+ - The selector `gridDensityValueSelector` was removed, use the `gridDensitySelector` instead.
56
+
57
+ - The props `rowBuffer` and `columnBuffer` were renamed to `rowBufferPx` and `columnBufferPx`.
58
+ Their value is now a pixel value rather than a number of items. Their default value is now `150`.
59
+
60
+ - The props `rowThreshold` and `columnThreshold` have been removed.
61
+ If you had the `rowThreshold` prop set to `0` to force new rows to be rendered more often – this is no longer necessary.
62
+
63
+ #### `@mui/x-data-grid@7.0.0`
64
+
65
+ - [DataGrid] Allow to control the grid density (#12332) @MBilalShafi
66
+ - [DataGrid] Dynamic virtualization range (#12353) @romgrk
67
+ - [DataGrid] Fix `ElementType` usage (#12479) @cherniavskii
68
+ - [DataGrid] Fix cell value formatting on copy (#12357) @sai6855
69
+ - [DataGrid] Fix checkbox selection is keeping selection when filtering (#11751) @g1mishra
70
+ - [DataGrid] Make `rows` an optional prop (#12478) @MBilalShafi
71
+
72
+ #### `@mui/x-data-grid-pro@7.0.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
73
+
74
+ Same changes as in `@mui/x-data-grid@7.0.0`.
75
+
76
+ #### `@mui/x-data-grid-premium@7.0.0` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
77
+
78
+ Same changes as in `@mui/x-data-grid-pro@7.0.0`, plus:
79
+
80
+ - [DataGridPremium] Add support for confirmation before clipboard paste (#12225) @cherniavskii
81
+ - [DataGridPremium] Fix single grouping column sorting (#9679) @cherniavskii
82
+ - [DataGridPremium] Fix boolean cell not rendered in group rows (#12492) @sai6855
83
+
84
+ ### Date and Time Pickers
85
+
86
+ #### Breaking changes
87
+
88
+ - The `DesktopDateTimePicker` view rendering has been optimized by using the same technique as for `DesktopDateTimeRangePicker`.
89
+ - The `dateTimeViewRenderers` have been removed in favor of reusing existing time view renderers (`renderTimeViewClock`, `renderDigitalClockTimeView` and `renderMultiSectionDigitalClockTimeView`) and date view renderer (`renderDateViewCalendar`).
90
+ - Passing `renderTimeViewClock` to time view renderers will no longer revert to the old behavior of rendering only date or time view.
91
+
92
+ #### `@mui/x-date-pickers@7.0.0`
93
+
94
+ - [fields] Allow to override the separator between the start and the end date in all range fields (#12174) @flaviendelangle
95
+ - [fields] Support format without separator (#12489) @flaviendelangle
96
+ - [pickers] Use renderer interceptor on `DesktopDateTimePicker` (#12441) @LukasTy
97
+
98
+ #### `@mui/x-date-pickers-pro@7.0.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
99
+
100
+ Same changes as in `@mui/x-date-pickers@7.0.0`, plus:
101
+
102
+ - [DateTimeRangePicker] Add component `JSDoc` (#12518) @LukasTy
103
+ - [DateTimeRangePicker] Fix views behavior regression (#12529) @LukasTy
104
+
105
+ ### Charts
106
+
107
+ #### `@mui/x-charts@7.0.0`
108
+
109
+ - [charts] Fix small typo in `CartesianContextProvider` (#12461) @Janpot
110
+
111
+ ### Tree View
112
+
113
+ #### Breaking changes
114
+
115
+ - The required `nodeId` prop used by the `TreeItem` has been renamed to `itemId` for consistency:
116
+
117
+ ```diff
118
+ <TreeView>
119
+ - <TreeItem label="Item 1" nodeId="one">
120
+ + <TreeItem label="Item 1" itemId="one">
121
+ </TreeView>
122
+ ```
123
+
124
+ - The focus is now applied to the Tree Item root element instead of the Tree View root element.
125
+
126
+ This change will allow new features that require the focus to be on the Tree Item,
127
+ like the drag and drop reordering of items.
128
+ It also solves several issues with focus management,
129
+ like the inability to scroll to the focused item when a lot of items are rendered.
130
+
131
+ This will mostly impact how you write tests to interact with the Tree View:
132
+
133
+ For example, if you were writing a test with `react-testing-library`, here is what the changes could look like:
134
+
135
+ ```diff
136
+ it('test example on first item', () => {
137
+ - const { getByRole } = render(
138
+ + const { getAllByRole } = render(
139
+ <SimpleTreeView>
140
+ <TreeItem nodeId="one" />
141
+ <TreeItem nodeId="two" />
142
+ </SimpleTreeView>
143
+ );
144
+
145
+ - const tree = getByRole('tree');
146
+ + const firstTreeItem = getAllByRole('treeitem')[0];
147
+ act(() => {
148
+ - tree.focus();
149
+ + firstTreeItem.focus();
150
+ });
151
+ - fireEvent.keyDown(tree, { key: 'ArrowDown' });
152
+ + fireEvent.keyDown(firstTreeItem, { key: 'ArrowDown' });
153
+ })
154
+ ```
155
+
156
+ #### `@mui/x-tree-view@7.0.0`
157
+
158
+ - [TreeView] Rename `nodeId` to `itemId` (#12418) @noraleonte
159
+ - [TreeView] Set focus on the focused Tree Item instead of the Tree View (#12226) @flaviendelangle
160
+ - [TreeView] Update JSDoc of the `ContentComponent` prop to avoid using the word "node" (#12476) @flaviendelangle
161
+
162
+ ### `@mui/x-codemod@7.0.0`
163
+
164
+ - [codemod] Add a codemod and update the grid migration guide (#12488) @MBilalShafi
165
+
166
+ ### Docs
167
+
168
+ - [docs] Finalize migration guide (#12501) @noraleonte
169
+ - [docs] Fix nested cells alignment in the popular features demo (#12450) @cherniavskii
170
+ - [docs] Fix some Vale errors (#12469) @oliviertassinari
171
+ - [docs] Remove mentions of pre release (#12513) @noraleonte
172
+ - [docs] Update branch name and tags (#12498) @cherniavskii
173
+ - [docs] Update links to v6 (#12496) @cherniavskii
174
+ - [docs] Update links to v7 docs (#12500) @noraleonte
175
+ - [docs] Update supported versions (#12508) @joserodolfofreitas
176
+ - [docs] Update "What's new in MUI X" page #12527 @cherniavskii
177
+
178
+ ### Core
179
+
180
+ - [core] Bump `@mui/material` peer dependency for all packages (#12516) @LukasTy
181
+ - [core] Fix `no-restricted-imports` ESLint rule not working for Data Grid packages (#12477) @cherniavskii
182
+ - [core] Lower the frequency of `no-response` action runs (#12491) @michaldudak
183
+ - [core] Remove leftover `legacy` `browserlistrc` entry (#12415) @LukasTy
184
+ - [core] Update NPM tag (#12511) @cherniavskii
185
+ - [core] Update supported browsers (browserlistrc) (#12521) @LukasTy
186
+ - [core] Use Circle CI context @oliviertassinari
187
+ - [license] Fix grammar on expired license error message (#12460) @joserodolfofreitas
188
+
189
+ ## 7.0.0-beta.7
190
+
191
+ _Mar 14, 2024_
192
+
193
+ We'd like to offer a big thanks to the 11 contributors who made this release possible. Here are some highlights ✨:
194
+
195
+ - 🦥 The Lazy loading feature is now stable and the `lazyLoading` feature flag was removed from the `experimentalFeatures` prop.
196
+ - 🌍 Improve Japanese (ja-JP) locale for the Data Grid
197
+ - 🐞 Bugfixes
198
+ - 📚 Documentation improvements
199
+
200
+ ### Data Grid
201
+
202
+ #### Breaking changes
203
+
204
+ - The `columnHeader--showColumnBorder` class was replaced by `columnHeader--withLeftBorder` and `columnHeader--withRightBorder`.
205
+ - The `columnHeadersInner`, `columnHeadersInner--scrollable`, and `columnHeaderDropZone` classes were removed since the inner wrapper was removed in our effort to simplify the DOM structure and improve accessibility.
206
+ - The `pinnedColumnHeaders`, `pinnedColumnHeaders--left`, and `pinnedColumnHeaders--right` classes were removed along with the element they were applied to.
207
+ The pinned column headers now use `position: 'sticky'` and are rendered in the same row element as the regular column headers.
208
+
209
+ #### `@mui/x-data-grid@7.0.0-beta.7`
210
+
211
+ - [DataGrid] Fix focus visible style on scrollbar (#12402) @oliviertassinari
212
+ - [DataGrid] Fix the issue where pressing the Delete key resets various cell values to an empty string. (#12216) @sooster910
213
+ - [DataGrid] Make `rowCount` part of the state (#12381) @MBilalShafi
214
+ - [DataGrid] Make column resizing and autosizing available in Community plan (#12420) @cherniavskii
215
+ - [DataGrid] Remove `baseSwitch` slot (#12439) @romgrk
216
+ - [l10n] Improve Japanese (ja-JP) locale (#12398) @makoto14
217
+
218
+ #### `@mui/x-data-grid-pro@7.0.0-beta.7` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
219
+
220
+ Same changes as in `@mui/x-data-grid@7.0.0-beta.7`, plus:
221
+
222
+ - [DataGridPro] Add `inputRef` to the props passed to `colDef.renderHeaderFilter` (#12328) @vovarudomanenko
223
+ - [DataGridPro] Fix filler rendered for no reason when there are pinned columns (#12440) @cherniavskii
224
+ - [DataGridPro] Make lazy loading feature stable (#12421) @cherniavskii
225
+ - [DataGridPro] Render pinned and non-pinned column headers in one row (#12376) @cherniavskii
226
+
227
+ #### `@mui/x-data-grid-premium@7.0.0-beta.7` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
228
+
229
+ Same changes as in `@mui/x-data-grid-pro@7.0.0-beta.7`, plus:
230
+
231
+ - [DataGridPremium] Fix auto-scroll not working when selecting cell range (#12267) @cherniavskii
232
+
233
+ ### Date and Time Pickers
234
+
235
+ #### `@mui/x-date-pickers@7.0.0-beta.7`
236
+
237
+ - [fields] Fix `tabIndex` on accessible field DOM structure (#12311) @flaviendelangle
238
+ - [fields] Fix items alignment on multi input range fields (#12312) @flaviendelangle
239
+ - [pickers] Improve the customization of the range picker calendar header (#11988) @flaviendelangle
240
+ - [pickers] Keep the existing time when looking for closest enabled date (#12377) @LukasTy
241
+
242
+ #### `@mui/x-date-pickers-pro@7.0.0-beta.7` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
243
+
244
+ Same changes as in `@mui/x-date-pickers@7.0.0-beta.7`.
245
+
246
+ ### Charts
247
+
248
+ #### `@mui/x-charts@7.0.0-beta.7`
249
+
250
+ - [charts] Fix axis highlight when axis is reversed (#12407) @alexfauquette
251
+
252
+ ### Tree View
253
+
254
+ #### Breaking changes
255
+
256
+ The `onNodeFocus` callback has been renamed to `onItemFocus` for consistency:
257
+
258
+ ```diff
259
+ <SimpleTreeView
260
+ - onNodeFocus={onNodeFocus}
261
+ + onItemFocus={onItemFocus}
262
+ />
263
+ ```
264
+
265
+ #### `@mui/x-tree-view@7.0.0-beta.7`
266
+
267
+ - [TreeView] Clean the usage of the term "item" and "node" in API introduced during v7 (#12368) @noraleonte
268
+ - [TreeView] Introduce a new `TreeItem2` component and a new `useTreeItem2` hook (#11721) @flaviendelangle
269
+ - [TreeView] Rename `onNodeFocus` to `onItemFocus` (#12419) @noraleonte
270
+
271
+ ### Docs
272
+
273
+ - [docs] Add `legacy` bundle drop mention in migration pages (#12424) @LukasTy
274
+ - [docs] Add missing luxon `Info` import (#12427) @LukasTy
275
+ - [docs] Improve slots definitions for charts (#12408) @alexfauquette
276
+ - [docs] Polish What's new in MUI X blog titles (#12309) @oliviertassinari
277
+ - [docs] Replace `rel="noreferrer"` by `rel="noopener"` @oliviertassinari
278
+ - [docs] Update `date-fns` `weekStarsOn` overriding example (#12416) @LukasTy
279
+
280
+ ### Core
281
+
282
+ - [core] Fix CI (#12414) @flaviendelangle
283
+ - [core] Fix PR deploy link for Tree View doc pages (#12411) @flaviendelangle
284
+
6
285
  ## 7.0.0-beta.6
7
286
 
8
287
  _Mar 8, 2024_
@@ -156,7 +435,7 @@ Same changes as in `@mui/x-date-pickers@7.0.0-beta.5`.
156
435
  ### Docs
157
436
 
158
437
  - [docs] Fix image layout shift when loading @oliviertassinari
159
- - [docs] Match Material UI repo comment for redirections @oliviertassinari
438
+ - [docs] Match Material UI repo comment for redirections @oliviertassinari
160
439
  - [docs] Non breaking spaces @oliviertassinari
161
440
  - [docs] Polish the Date Picker playground (#11869) @zanivan
162
441
  - [docs] Standardize WAI-ARIA references @oliviertassinari
@@ -167,9 +446,9 @@ Same changes as in `@mui/x-date-pickers@7.0.0-beta.5`.
167
446
  - [core] Remove grid folder from `getComponentInfo` RegExp (#12241) @flaviendelangle
168
447
  - [core] Remove `window.` reference for common globals @oliviertassinari
169
448
  - [core] Use runtime agnostic setTimeout type @oliviertassinari
170
- - [docs-infra] Fix Stack Overflow breaking space @oliviertassinari
449
+ - [docs-infra] Fix Stack Overflow breaking space @oliviertassinari
171
450
  - [docs-infra] Fix missing non breaking spaces @oliviertassinari
172
- - [github] Update `no-response` workflow (#12193) @MBilalShafi
451
+ - [infra] Update `no-response` workflow (#12193) @MBilalShafi
173
452
  - [infra] Fix missing permission reset @oliviertassinari
174
453
 
175
454
  ## 7.0.0-beta.4
@@ -186,7 +465,7 @@ We'd like to offer a big thanks to the 10 contributors who made this release pos
186
465
 
187
466
  ### Breaking changes
188
467
 
189
- - The support for IE11 has been removed from all MUI X packages. The `legacy` bundle that used to support old browsers like IE11 is no longer included.
468
+ - The support for IE11 has been removed from all MUI X packages. The `legacy` bundle that used to support old browsers like IE11 is no longer included.
190
469
 
191
470
  ### Data Grid
192
471
 
@@ -228,7 +507,7 @@ Same changes as in `@mui/x-data-grid-pro@7.0.0-beta.4`.
228
507
  - The headless field hooks (e.g.: `useDateField`) now returns a new prop called `enableAccessibleFieldDOMStructure`.
229
508
  This property is utilized to determine whether the anticipated UI is constructed using an accessible DOM structure. Learn more about this new [accessible DOM structure](/x/react-date-pickers/fields/#accessible-dom-structure).
230
509
 
231
- When building a custom UI, you are most-likely only supporting one DOM structure, so you can remove `enableAccessibleFieldDOMStructure` before it is passed to the DOM:
510
+ When building a custom UI, you are most-likely only supporting one DOM structure, so you can remove `enableAccessibleFieldDOMStructure` before it is passed to the DOM:
232
511
 
233
512
  ```diff
234
513
  function MyCustomTextField(props) {
@@ -296,7 +575,7 @@ These components are no longer exported from `@mui/x-charts`:
296
575
  ### Docs
297
576
 
298
577
  - [docs] Add recipe for hiding separator on non-resizable columns (#12134) @michelengelen
299
- - [docs] Add small improvements to the Gauge Chart page (#12076) @danilo-leal
578
+ - [docs] Add small improvements to the Gauge page (#12076) @danilo-leal
300
579
  - [docs] Add the 'point' scaleType to the axis documentation (#12179) @alexfauquette
301
580
  - [docs] Clarify Pickers 'Component composition' section (#12097) @LukasTy
302
581
  - [docs] Fix "Licensing" page link (#12156) @LukasTy
@@ -879,7 +1158,7 @@ Same changes as in `@mui/x-date-pickers@7.0.0-alpha.9`.
879
1158
 
880
1159
  - [charts] Do not propagate `innerRadius` and `outerRadius` to the DOM (#11689) @alexfauquette
881
1160
  - [charts] Fix default `stackOffset` for `LineChart` (#11647) @alexfauquette
882
- - [charts] Remove a TS ignore (#11688) @alexfauquette
1161
+ - [charts] Remove a TypeScript ignore (#11688) @alexfauquette
883
1162
 
884
1163
  ### Tree View
885
1164
 
@@ -1308,7 +1587,7 @@ Same changes as in `@mui/x-date-pickers@7.0.0-alpha.7`.
1308
1587
  - [core] Fix release changelog (#11496) @romgrk
1309
1588
  - [core] Fix use of ::before & ::after (#11515) @oliviertassinari
1310
1589
  - [core] Localize the issue template to MUI X (#11511) @oliviertassinari
1311
- - [core] Regen api files (#11542) @flaviendelangle
1590
+ - [core] Regenerate API files (#11542) @flaviendelangle
1312
1591
  - [core] Remove issue emoji @oliviertassinari
1313
1592
  - [core] Sync the release instructions with MUI Core @oliviertassinari
1314
1593
  - [core] Yaml format match most common convention @oliviertassinari
@@ -1351,7 +1630,7 @@ We'd like to offer a big thanks to the 6 contributors who made this release poss
1351
1630
 
1352
1631
  - The `filterModel` now supports `Date` objects as values for `date` and `dateTime` column types.
1353
1632
  The `filterModel` still accepts strings as values for `date` and `dateTime` column types,
1354
- but all updates to the `filterModel` coming from the UI (e.g. filter panel) will set the value as a `Date` object.
1633
+ but all updates to the `filterModel` coming from the UI (for example filter panel) will set the value as a `Date` object.
1355
1634
 
1356
1635
  #### `@mui/x-data-grid@7.0.0-alpha.6`
1357
1636
 
@@ -1562,7 +1841,7 @@ Same changes as in `@mui/x-date-pickers@7.0.0-alpha.5`, plus:
1562
1841
  ### Core
1563
1842
 
1564
1843
  - [core] Automate cherry-pick of PRs from `next` -> `master` (#11382) @MBilalShafi
1565
- - [github] Update `no-response` workflow (#11369) @MBilalShafi
1844
+ - [infra] Update `no-response` workflow (#11369) @MBilalShafi
1566
1845
  - [test] Fix flaky screenshots (#11388) @cherniavskii
1567
1846
 
1568
1847
  ## 7.0.0-alpha.4
@@ -1731,7 +2010,7 @@ Same changes as in `@mui/x-data-grid-pro@7.0.0-alpha.3`, plus:
1731
2010
  The Firefox browser currently does not support this behavior because the [getWeekInfo](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getWeekInfo) API is not yet implemented.
1732
2011
 
1733
2012
  ```ts
1734
- import { Settings } from 'luxon';
2013
+ import { Settings, Info } from 'luxon';
1735
2014
 
1736
2015
  Settings.defaultWeekSettings = {
1737
2016
  firstDay: 1,
@@ -1800,7 +2079,7 @@ Same changes as in `@mui/x-date-pickers@7.0.0-alpha.3`.
1800
2079
 
1801
2080
  - [charts] Adjusted `defaultizeValueFormatter` util to accept an optional `series.valueFormatter` value (#11144) @michelengelen
1802
2081
  - [charts] Apply `labelStyle` and `tickLabelStyle` props on `<ChartsYAxis />` (#11180) @akamfoad
1803
- - [charts] Fix TS config (#11259) @alexfauquette
2082
+ - [charts] Fix TypeScript config (#11259) @alexfauquette
1804
2083
  - [charts] Fix error with empty dataset (#11063) @alexfauquette
1805
2084
  - [charts] Fix export strategy (#11235) @alexfauquette
1806
2085
  - [charts] Remove outdated prop-types (#11045) @alexfauquette
@@ -2521,6 +2800,26 @@ Here is an example of the renaming for the `<ChartsTooltip />` component.
2521
2800
  - [core] Update release instructions as per v7 configuration (#10962) @MBilalShafi
2522
2801
  - [license] Correctly throw errors (#10924) @oliviertassinari
2523
2802
 
2803
+ ## 6.19.7
2804
+
2805
+ _Mar 14, 2024_
2806
+
2807
+ We'd like to offer a big thanks to @LukasTy who made this release possible.
2808
+
2809
+ ### Date Pickers
2810
+
2811
+ #### `@mui/x-date-pickers@6.19.7`
2812
+
2813
+ - [pickers] Keep the existing time when looking for closest enabled date (#12410) @LukasTy
2814
+
2815
+ #### `@mui/x-date-pickers-pro@6.19.7` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
2816
+
2817
+ Same changes as in `@mui/x-date-pickers@6.19.7`.
2818
+
2819
+ ### Docs
2820
+
2821
+ - [docs] Add Pickers custom start of week section (#12425) @LukasTy
2822
+
2524
2823
  ## 6.19.6
2525
2824
 
2526
2825
  _Mar 1, 2024_
@@ -11,8 +11,7 @@ import { resolveComponentProps, useSlotProps } from '@mui/base/utils';
11
11
  import { styled, useThemeProps } from '@mui/material/styles';
12
12
  import { unstable_composeClasses as composeClasses } from '@mui/utils';
13
13
  import { Watermark } from '@mui/x-license';
14
- import { PickersCalendarHeader } from '@mui/x-date-pickers/PickersCalendarHeader';
15
- import { applyDefaultDate, DayCalendar, useDefaultReduceAnimations, PickersArrowSwitcher, useCalendarState, useDefaultDates, useLocaleText, useNextMonthDisabled, usePreviousMonthDisabled, useUtils, useNow, DEFAULT_DESKTOP_MODE_MEDIA_QUERY, buildWarning, useControlledValueWithTimezone, useViews } from '@mui/x-date-pickers/internals';
14
+ import { applyDefaultDate, DayCalendar, useDefaultReduceAnimations, useCalendarState, useDefaultDates, useUtils, useNow, DEFAULT_DESKTOP_MODE_MEDIA_QUERY, buildWarning, useControlledValueWithTimezone, useViews } from '@mui/x-date-pickers/internals';
16
15
  import { getReleaseInfo } from '../internals/utils/releaseInfo';
17
16
  import { dateRangeCalendarClasses, getDateRangeCalendarUtilityClass } from './dateRangeCalendarClasses';
18
17
  import { isEndOfRange, isRangeValid, isStartOfRange, isWithinRange } from '../internals/utils/date-utils';
@@ -22,6 +21,7 @@ import { rangeValueManager } from '../internals/utils/valueManagers';
22
21
  import { useDragRange } from './useDragRange';
23
22
  import { useRangePosition } from '../internals/hooks/useRangePosition';
24
23
  import { DAY_RANGE_SIZE, DAY_MARGIN } from '../internals/constants/dimensions';
24
+ import { PickersRangeCalendarHeader } from '../PickersRangeCalendarHeader';
25
25
  import { jsx as _jsx } from "react/jsx-runtime";
26
26
  import { jsxs as _jsxs } from "react/jsx-runtime";
27
27
  const releaseInfo = getReleaseInfo();
@@ -44,12 +44,6 @@ const DateRangeCalendarMonthContainer = styled('div', {
44
44
  borderRight: `1px solid ${(theme.vars || theme).palette.divider}`
45
45
  }
46
46
  }));
47
- const DateRangeCalendarArrowSwitcher = styled(PickersArrowSwitcher)({
48
- padding: '12px 16px 4px 16px',
49
- display: 'flex',
50
- alignItems: 'center',
51
- justifyContent: 'space-between'
52
- });
53
47
  const weeksContainerHeight = (DAY_RANGE_SIZE + DAY_MARGIN * 2) * 6;
54
48
  const warnInvalidCurrentMonthCalendarPosition = buildWarning(['The `currentMonthCalendarPosition` prop must be an integer between `1` and the amount of calendars rendered.', 'For example if you have 2 calendars rendered, it should be equal to either 1 or 2.']);
55
49
  const DayCalendarForRange = styled(DayCalendar)(({
@@ -75,7 +69,6 @@ const DayCalendarForRange = styled(DayCalendar)(({
75
69
  }
76
70
  }));
77
71
  function useDateRangeCalendarDefaultizedProps(props, name) {
78
- var _themeProps$renderLoa, _themeProps$reduceAni, _props$loading, _props$disablePast, _props$disableFuture, _themeProps$openTo, _themeProps$views, _themeProps$calendars, _themeProps$disableDr, _themeProps$available;
79
72
  const utils = useUtils();
80
73
  const defaultDates = useDefaultDates();
81
74
  const defaultReduceAnimations = useDefaultReduceAnimations();
@@ -84,20 +77,20 @@ function useDateRangeCalendarDefaultizedProps(props, name) {
84
77
  name
85
78
  });
86
79
  return _extends({}, themeProps, {
87
- renderLoading: (_themeProps$renderLoa = themeProps.renderLoading) != null ? _themeProps$renderLoa : () => /*#__PURE__*/_jsx("span", {
80
+ renderLoading: themeProps.renderLoading ?? (() => /*#__PURE__*/_jsx("span", {
88
81
  children: "..."
89
- }),
90
- reduceAnimations: (_themeProps$reduceAni = themeProps.reduceAnimations) != null ? _themeProps$reduceAni : defaultReduceAnimations,
91
- loading: (_props$loading = props.loading) != null ? _props$loading : false,
92
- disablePast: (_props$disablePast = props.disablePast) != null ? _props$disablePast : false,
93
- disableFuture: (_props$disableFuture = props.disableFuture) != null ? _props$disableFuture : false,
94
- openTo: (_themeProps$openTo = themeProps.openTo) != null ? _themeProps$openTo : 'day',
95
- views: (_themeProps$views = themeProps.views) != null ? _themeProps$views : ['day'],
82
+ })),
83
+ reduceAnimations: themeProps.reduceAnimations ?? defaultReduceAnimations,
84
+ loading: props.loading ?? false,
85
+ disablePast: props.disablePast ?? false,
86
+ disableFuture: props.disableFuture ?? false,
87
+ openTo: themeProps.openTo ?? 'day',
88
+ views: themeProps.views ?? ['day'],
96
89
  minDate: applyDefaultDate(utils, themeProps.minDate, defaultDates.minDate),
97
90
  maxDate: applyDefaultDate(utils, themeProps.maxDate, defaultDates.maxDate),
98
- calendars: (_themeProps$calendars = themeProps.calendars) != null ? _themeProps$calendars : 2,
99
- disableDragEditing: (_themeProps$disableDr = themeProps.disableDragEditing) != null ? _themeProps$disableDr : false,
100
- availableRangePositions: (_themeProps$available = themeProps.availableRangePositions) != null ? _themeProps$available : ['start', 'end']
91
+ calendars: themeProps.calendars ?? 2,
92
+ disableDragEditing: themeProps.disableDragEditing ?? false,
93
+ availableRangePositions: themeProps.availableRangePositions ?? ['start', 'end']
101
94
  });
102
95
  }
103
96
  const useUtilityClasses = ownerState => {
@@ -123,7 +116,6 @@ const useUtilityClasses = ownerState => {
123
116
  * - [DateRangeCalendar API](https://mui.com/x/api/date-pickers/date-range-calendar/)
124
117
  */
125
118
  const DateRangeCalendar = /*#__PURE__*/React.forwardRef(function DateRangeCalendar(inProps, ref) {
126
- var _slots$calendarHeader;
127
119
  const props = useDateRangeCalendarDefaultizedProps(inProps, 'MuiDateRangeCalendar');
128
120
  const shouldHavePreview = useMediaQuery(DEFAULT_DESKTOP_MODE_MEDIA_QUERY, {
129
121
  defaultMatches: false
@@ -192,7 +184,6 @@ const DateRangeCalendar = /*#__PURE__*/React.forwardRef(function DateRangeCalend
192
184
  autoFocus
193
185
  });
194
186
  const utils = useUtils();
195
- const localeText = useLocaleText();
196
187
  const now = useNow(timezone);
197
188
  const {
198
189
  rangePosition,
@@ -290,15 +281,12 @@ const DateRangeCalendar = /*#__PURE__*/React.forwardRef(function DateRangeCalend
290
281
  shouldDisableDate: wrappedShouldDisableDate,
291
282
  timezone
292
283
  });
293
-
294
- // When disabled, limit the view to the selected date
295
- const minDateWithDisabled = disabled && value[0] || minDate;
296
- const maxDateWithDisabled = disabled && value[1] || maxDate;
297
- const CalendarHeader = (_slots$calendarHeader = slots == null ? void 0 : slots.calendarHeader) != null ? _slots$calendarHeader : PickersCalendarHeader;
284
+ const CalendarHeader = slots?.calendarHeader ?? PickersRangeCalendarHeader;
298
285
  const calendarHeaderProps = useSlotProps({
299
286
  elementType: CalendarHeader,
300
- externalSlotProps: slotProps == null ? void 0 : slotProps.calendarHeader,
287
+ externalSlotProps: slotProps?.calendarHeader,
301
288
  additionalProps: {
289
+ calendars,
302
290
  views: ['day'],
303
291
  view: 'day',
304
292
  currentMonth: calendarState.currentMonth,
@@ -306,26 +294,25 @@ const DateRangeCalendar = /*#__PURE__*/React.forwardRef(function DateRangeCalend
306
294
  newMonth,
307
295
  direction
308
296
  }),
309
- minDate: minDateWithDisabled,
310
- maxDate: maxDateWithDisabled,
297
+ minDate,
298
+ maxDate,
311
299
  disabled,
312
300
  disablePast,
313
301
  disableFuture,
314
302
  reduceAnimations,
303
+ timezone,
315
304
  slots,
316
- slotProps,
317
- timezone
305
+ slotProps
318
306
  },
319
307
  ownerState: props
320
308
  });
321
309
  const prevValue = React.useRef(null);
322
310
  React.useEffect(() => {
323
- var _prevValue$current, _prevValue$current2;
324
311
  const date = rangePosition === 'start' ? value[0] : value[1];
325
312
  if (!date || !utils.isValid(date)) {
326
313
  return;
327
314
  }
328
- const prevDate = rangePosition === 'start' ? (_prevValue$current = prevValue.current) == null ? void 0 : _prevValue$current[0] : (_prevValue$current2 = prevValue.current) == null ? void 0 : _prevValue$current2[1];
315
+ const prevDate = rangePosition === 'start' ? prevValue.current?.[0] : prevValue.current?.[1];
329
316
  prevValue.current = value;
330
317
 
331
318
  // The current date did not change, this call comes either from a `rangePosition` change or a change in the other date.
@@ -344,22 +331,6 @@ const DateRangeCalendar = /*#__PURE__*/React.forwardRef(function DateRangeCalend
344
331
  }
345
332
  }, [rangePosition, value]); // eslint-disable-line
346
333
 
347
- const selectNextMonth = React.useCallback(() => {
348
- changeMonth(utils.addMonths(calendarState.currentMonth, 1));
349
- }, [changeMonth, calendarState.currentMonth, utils]);
350
- const selectPreviousMonth = React.useCallback(() => {
351
- changeMonth(utils.addMonths(calendarState.currentMonth, -1));
352
- }, [changeMonth, calendarState.currentMonth, utils]);
353
- const isNextMonthDisabled = useNextMonthDisabled(calendarState.currentMonth, {
354
- disableFuture,
355
- maxDate,
356
- timezone
357
- });
358
- const isPreviousMonthDisabled = usePreviousMonthDisabled(calendarState.currentMonth, {
359
- disablePast,
360
- minDate,
361
- timezone
362
- });
363
334
  const baseDateValidationProps = {
364
335
  disablePast,
365
336
  disableFuture,
@@ -393,7 +364,6 @@ const DateRangeCalendar = /*#__PURE__*/React.forwardRef(function DateRangeCalend
393
364
  }, slots);
394
365
  const slotPropsForDayCalendar = _extends({}, slotProps, {
395
366
  day: dayOwnerState => {
396
- var _resolveComponentProp;
397
367
  const {
398
368
  day
399
369
  } = dayOwnerState;
@@ -422,7 +392,7 @@ const DateRangeCalendar = /*#__PURE__*/React.forwardRef(function DateRangeCalend
422
392
  'data-position': datePosition
423
393
  }, dragEventHandlers, {
424
394
  draggable: isElementDraggable ? true : undefined
425
- }, (_resolveComponentProp = resolveComponentProps(slotProps == null ? void 0 : slotProps.day, dayOwnerState)) != null ? _resolveComponentProp : {});
395
+ }, resolveComponentProps(slotProps?.day, dayOwnerState) ?? {});
426
396
  }
427
397
  });
428
398
  const calendarMonths = React.useMemo(() => Array.from({
@@ -440,7 +410,6 @@ const DateRangeCalendar = /*#__PURE__*/React.forwardRef(function DateRangeCalend
440
410
  }).map((_, index) => utils.addMonths(firstMonth, index));
441
411
  }, [utils, calendarState.currentMonth, calendars, currentMonthCalendarPosition]);
442
412
  const focusedMonth = React.useMemo(() => {
443
- var _visibleMonths$find;
444
413
  if (!autoFocus) {
445
414
  return null;
446
415
  }
@@ -457,7 +426,7 @@ const DateRangeCalendar = /*#__PURE__*/React.forwardRef(function DateRangeCalend
457
426
  if (value[1] != null) {
458
427
  return visibleMonths.find(month => utils.isSameMonth(month, value[1]));
459
428
  }
460
- return (_visibleMonths$find = visibleMonths.find(month => utils.isSameMonth(month, now))) != null ? _visibleMonths$find : visibleMonths[0];
429
+ return visibleMonths.find(month => utils.isSameMonth(month, now)) ?? visibleMonths[0];
461
430
  }, [utils, value, visibleMonths, autoFocus, now]);
462
431
  return /*#__PURE__*/_jsxs(DateRangeCalendarRoot, _extends({
463
432
  ref: ref,
@@ -467,23 +436,14 @@ const DateRangeCalendar = /*#__PURE__*/React.forwardRef(function DateRangeCalend
467
436
  children: [/*#__PURE__*/_jsx(Watermark, {
468
437
  packageName: "x-date-pickers-pro",
469
438
  releaseInfo: releaseInfo
470
- }), calendarMonths.map((month, index) => {
471
- var _calendarHeaderProps$;
439
+ }), calendarMonths.map(monthIndex => {
440
+ const month = visibleMonths[monthIndex];
472
441
  return /*#__PURE__*/_jsxs(DateRangeCalendarMonthContainer, {
473
442
  className: classes.monthContainer,
474
- children: [calendars === 1 ? /*#__PURE__*/_jsx(CalendarHeader, _extends({}, calendarHeaderProps)) : /*#__PURE__*/_jsx(DateRangeCalendarArrowSwitcher, {
475
- onGoToPrevious: selectPreviousMonth,
476
- onGoToNext: selectNextMonth,
477
- isPreviousHidden: index !== 0,
478
- isPreviousDisabled: isPreviousMonthDisabled,
479
- previousLabel: localeText.previousMonth,
480
- isNextHidden: index !== calendars - 1,
481
- isNextDisabled: isNextMonthDisabled,
482
- nextLabel: localeText.nextMonth,
483
- slots: slots,
484
- slotProps: slotProps,
485
- children: utils.formatByString(visibleMonths[month], (_calendarHeaderProps$ = calendarHeaderProps.format) != null ? _calendarHeaderProps$ : `${utils.formats.month} ${utils.formats.year}`)
486
- }), /*#__PURE__*/_jsx(DayCalendarForRange, _extends({
443
+ children: [/*#__PURE__*/_jsx(CalendarHeader, _extends({}, calendarHeaderProps, {
444
+ month: month,
445
+ monthIndex: monthIndex
446
+ })), /*#__PURE__*/_jsx(DayCalendarForRange, _extends({
487
447
  className: classes.dayCalendar
488
448
  }, calendarState, baseDateValidationProps, commonViewProps, {
489
449
  onMonthSwitchingAnimationEnd: onMonthSwitchingAnimationEnd,
@@ -491,7 +451,7 @@ const DateRangeCalendar = /*#__PURE__*/React.forwardRef(function DateRangeCalend
491
451
  reduceAnimations: reduceAnimations,
492
452
  selectedDays: value,
493
453
  onSelectedDaysChange: handleSelectedDayChange,
494
- currentMonth: visibleMonths[month],
454
+ currentMonth: month,
495
455
  TransitionProps: CalendarTransitionProps,
496
456
  shouldDisableDate: wrappedShouldDisableDate,
497
457
  showDaysOutsideCurrentMonth: calendars === 1 && showDaysOutsideCurrentMonth,
@@ -500,12 +460,12 @@ const DateRangeCalendar = /*#__PURE__*/React.forwardRef(function DateRangeCalend
500
460
  renderLoading: renderLoading,
501
461
  slots: slotsForDayCalendar,
502
462
  slotProps: slotPropsForDayCalendar,
503
- autoFocus: visibleMonths[month] === focusedMonth,
463
+ autoFocus: month === focusedMonth,
504
464
  fixedWeekNumber: fixedWeekNumber,
505
465
  displayWeekNumber: displayWeekNumber,
506
466
  timezone: timezone
507
- }), index)]
508
- }, month);
467
+ }))]
468
+ }, monthIndex);
509
469
  })]
510
470
  }));
511
471
  });
@@ -687,7 +647,7 @@ process.env.NODE_ENV !== "production" ? DateRangeCalendar.propTypes = {
687
647
  /**
688
648
  * Disable specific date.
689
649
  *
690
- * Warning: This function can be called multiple times (e.g. when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance.
650
+ * Warning: This function can be called multiple times (for example when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance.
691
651
  *
692
652
  * @template TDate
693
653
  * @param {TDate} day The date to test.