@mui/x-date-pickers 8.5.2 → 8.6.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 +203 -11
- package/DateCalendar/DateCalendar.js +16 -16
- package/DateCalendar/DayCalendar.js +48 -48
- package/DateCalendar/useCalendarState.js +25 -25
- package/DateCalendar/useIsDateDisabled.js +2 -2
- package/DatePicker/DatePickerToolbar.js +7 -9
- package/DateTimeField/DateTimeField.js +1 -1
- package/DateTimePicker/DateTimePicker.js +1 -1
- package/DateTimePicker/DateTimePickerToolbar.js +12 -13
- package/DateTimePicker/shared.js +3 -3
- package/DesktopDatePicker/DesktopDatePicker.js +3 -3
- package/DesktopDateTimePicker/DesktopDateTimePicker.js +4 -4
- package/DesktopTimePicker/DesktopTimePicker.js +4 -4
- package/DigitalClock/DigitalClock.d.ts +1 -1
- package/DigitalClock/DigitalClock.js +16 -16
- package/LocalizationProvider/LocalizationProvider.d.ts +9 -3
- package/LocalizationProvider/LocalizationProvider.js +28 -19
- package/MobileDatePicker/MobileDatePicker.js +3 -3
- package/MobileDateTimePicker/MobileDateTimePicker.js +4 -4
- package/MobileTimePicker/MobileTimePicker.js +4 -4
- package/MonthCalendar/MonthCalendar.js +19 -18
- package/MultiSectionDigitalClock/MultiSectionDigitalClock.js +32 -32
- package/MultiSectionDigitalClock/MultiSectionDigitalClock.utils.d.ts +4 -4
- package/MultiSectionDigitalClock/MultiSectionDigitalClock.utils.js +7 -7
- package/PickerDay2/PickerDay2.js +3 -3
- package/PickersActionBar/PickersActionBar.d.ts +2 -2
- package/PickersActionBar/PickersActionBar.js +2 -2
- package/PickersCalendarHeader/PickersCalendarHeader.js +7 -8
- package/PickersDay/PickersDay.js +3 -3
- package/PickersDay/usePickerDayOwnerState.js +5 -5
- package/PickersTextField/PickersFilledInput/pickersFilledInputClasses.d.ts +1 -0
- package/PickersTextField/PickersInput/pickersInputClasses.d.ts +1 -0
- package/PickersTextField/PickersInputBase/pickersInputBaseClasses.d.ts +2 -0
- package/PickersTextField/PickersInputBase/pickersInputBaseClasses.js +1 -1
- package/PickersTextField/PickersOutlinedInput/pickersOutlinedInputClasses.d.ts +1 -0
- package/StaticDateTimePicker/StaticDateTimePicker.js +1 -1
- package/StaticTimePicker/StaticTimePicker.js +1 -1
- package/TimeClock/Clock.js +8 -9
- package/TimeClock/ClockNumbers.d.ts +3 -3
- package/TimeClock/ClockNumbers.js +5 -5
- package/TimeClock/TimeClock.js +29 -29
- package/TimeField/TimeField.js +1 -1
- package/TimePicker/TimePicker.js +1 -1
- package/TimePicker/TimePickerToolbar.js +7 -9
- package/TimePicker/shared.js +3 -3
- package/YearCalendar/YearCalendar.js +19 -18
- package/esm/DateCalendar/DateCalendar.js +16 -16
- package/esm/DateCalendar/DayCalendar.js +48 -48
- package/esm/DateCalendar/useCalendarState.js +25 -25
- package/esm/DateCalendar/useIsDateDisabled.js +2 -2
- package/esm/DatePicker/DatePickerToolbar.js +6 -8
- package/esm/DateTimeField/DateTimeField.js +1 -1
- package/esm/DateTimePicker/DateTimePicker.js +1 -1
- package/esm/DateTimePicker/DateTimePickerToolbar.js +11 -12
- package/esm/DateTimePicker/shared.js +3 -3
- package/esm/DesktopDatePicker/DesktopDatePicker.js +3 -3
- package/esm/DesktopDateTimePicker/DesktopDateTimePicker.js +4 -4
- package/esm/DesktopTimePicker/DesktopTimePicker.js +4 -4
- package/esm/DigitalClock/DigitalClock.d.ts +1 -1
- package/esm/DigitalClock/DigitalClock.js +16 -16
- package/esm/LocalizationProvider/LocalizationProvider.d.ts +9 -3
- package/esm/LocalizationProvider/LocalizationProvider.js +27 -18
- package/esm/MobileDatePicker/MobileDatePicker.js +3 -3
- package/esm/MobileDateTimePicker/MobileDateTimePicker.js +4 -4
- package/esm/MobileTimePicker/MobileTimePicker.js +4 -4
- package/esm/MonthCalendar/MonthCalendar.js +20 -19
- package/esm/MultiSectionDigitalClock/MultiSectionDigitalClock.js +32 -32
- package/esm/MultiSectionDigitalClock/MultiSectionDigitalClock.utils.d.ts +4 -4
- package/esm/MultiSectionDigitalClock/MultiSectionDigitalClock.utils.js +7 -7
- package/esm/PickerDay2/PickerDay2.js +3 -3
- package/esm/PickersActionBar/PickersActionBar.d.ts +2 -2
- package/esm/PickersActionBar/PickersActionBar.js +2 -2
- package/esm/PickersCalendarHeader/PickersCalendarHeader.js +6 -7
- package/esm/PickersDay/PickersDay.js +3 -3
- package/esm/PickersDay/usePickerDayOwnerState.js +5 -5
- package/esm/PickersTextField/PickersFilledInput/pickersFilledInputClasses.d.ts +1 -0
- package/esm/PickersTextField/PickersInput/pickersInputClasses.d.ts +1 -0
- package/esm/PickersTextField/PickersInputBase/pickersInputBaseClasses.d.ts +2 -0
- package/esm/PickersTextField/PickersInputBase/pickersInputBaseClasses.js +1 -1
- package/esm/PickersTextField/PickersOutlinedInput/pickersOutlinedInputClasses.d.ts +1 -0
- package/esm/StaticDateTimePicker/StaticDateTimePicker.js +1 -1
- package/esm/StaticTimePicker/StaticTimePicker.js +1 -1
- package/esm/TimeClock/Clock.js +7 -8
- package/esm/TimeClock/ClockNumbers.d.ts +3 -3
- package/esm/TimeClock/ClockNumbers.js +5 -5
- package/esm/TimeClock/TimeClock.js +29 -29
- package/esm/TimeField/TimeField.js +1 -1
- package/esm/TimePicker/TimePicker.js +1 -1
- package/esm/TimePicker/TimePickerToolbar.js +6 -8
- package/esm/TimePicker/shared.js +3 -3
- package/esm/YearCalendar/YearCalendar.js +20 -19
- package/esm/hooks/index.d.ts +2 -1
- package/esm/hooks/index.js +2 -1
- package/esm/hooks/useParsedFormat.js +6 -6
- package/esm/hooks/usePickerAdapter.d.ts +7 -0
- package/esm/hooks/usePickerAdapter.js +20 -0
- package/esm/hooks/usePickerTranslations.js +1 -1
- package/esm/index.js +1 -1
- package/esm/internals/components/pickersToolbarClasses.d.ts +1 -1
- package/esm/internals/demo/DemoContainer.d.ts +2 -3
- package/esm/internals/demo/DemoContainer.js +3 -2
- package/esm/internals/hooks/date-helpers-hooks.js +16 -16
- package/esm/internals/hooks/useClockReferenceDate.d.ts +2 -2
- package/esm/internals/hooks/useClockReferenceDate.js +3 -3
- package/esm/internals/hooks/useControlledValue.js +8 -7
- package/esm/internals/hooks/useField/buildSectionsFromFormat.d.ts +1 -1
- package/esm/internals/hooks/useField/buildSectionsFromFormat.js +17 -17
- package/esm/internals/hooks/useField/useField.types.d.ts +2 -2
- package/esm/internals/hooks/useField/useField.utils.d.ts +10 -10
- package/esm/internals/hooks/useField/useField.utils.js +69 -69
- package/esm/internals/hooks/useField/useFieldCharacterEditing.js +11 -11
- package/esm/internals/hooks/useField/useFieldRootHandleKeyDown.js +7 -7
- package/esm/internals/hooks/useField/useFieldSectionContentProps.js +15 -16
- package/esm/internals/hooks/useField/useFieldState.js +22 -24
- package/esm/internals/hooks/usePicker/hooks/useValueAndOpenStates.js +6 -6
- package/esm/internals/hooks/usePicker/usePicker.js +5 -6
- package/esm/internals/hooks/useUtils.d.ts +1 -8
- package/esm/internals/hooks/useUtils.js +3 -19
- package/esm/internals/index.d.ts +2 -1
- package/esm/internals/index.js +2 -1
- package/esm/internals/models/manager.d.ts +14 -14
- package/esm/internals/models/props/time.d.ts +1 -1
- package/esm/internals/utils/date-time-utils.d.ts +1 -1
- package/esm/internals/utils/date-time-utils.js +5 -5
- package/esm/internals/utils/date-utils.d.ts +11 -11
- package/esm/internals/utils/date-utils.js +34 -34
- package/esm/internals/utils/getDefaultReferenceDate.d.ts +2 -2
- package/esm/internals/utils/getDefaultReferenceDate.js +16 -16
- package/esm/internals/utils/time-utils.d.ts +5 -5
- package/esm/internals/utils/time-utils.js +12 -12
- package/esm/internals/utils/valueManagers.js +4 -4
- package/esm/managers/useDateManager.js +12 -12
- package/esm/managers/useDateTimeManager.js +13 -13
- package/esm/managers/useTimeManager.js +9 -10
- package/esm/validation/useValidation.d.ts +2 -3
- package/esm/validation/useValidation.js +2 -2
- package/esm/validation/validateDate.js +6 -6
- package/esm/validation/validateTime.js +6 -6
- package/hooks/index.d.ts +2 -1
- package/hooks/index.js +8 -1
- package/hooks/useParsedFormat.js +6 -6
- package/hooks/usePickerAdapter.d.ts +7 -0
- package/hooks/usePickerAdapter.js +29 -0
- package/hooks/usePickerTranslations.js +2 -2
- package/index.js +1 -1
- package/internals/components/pickersToolbarClasses.d.ts +1 -1
- package/internals/demo/DemoContainer.d.ts +2 -3
- package/internals/demo/DemoContainer.js +3 -2
- package/internals/hooks/date-helpers-hooks.js +16 -16
- package/internals/hooks/useClockReferenceDate.d.ts +2 -2
- package/internals/hooks/useClockReferenceDate.js +3 -3
- package/internals/hooks/useControlledValue.js +7 -7
- package/internals/hooks/useField/buildSectionsFromFormat.d.ts +1 -1
- package/internals/hooks/useField/buildSectionsFromFormat.js +17 -17
- package/internals/hooks/useField/useField.types.d.ts +2 -2
- package/internals/hooks/useField/useField.utils.d.ts +10 -10
- package/internals/hooks/useField/useField.utils.js +69 -69
- package/internals/hooks/useField/useFieldCharacterEditing.js +11 -11
- package/internals/hooks/useField/useFieldRootHandleKeyDown.js +7 -7
- package/internals/hooks/useField/useFieldSectionContentProps.js +14 -15
- package/internals/hooks/useField/useFieldState.js +23 -25
- package/internals/hooks/usePicker/hooks/useValueAndOpenStates.js +6 -6
- package/internals/hooks/usePicker/usePicker.js +5 -6
- package/internals/hooks/useUtils.d.ts +1 -8
- package/internals/hooks/useUtils.js +5 -24
- package/internals/index.d.ts +2 -1
- package/internals/index.js +2 -7
- package/internals/models/manager.d.ts +14 -14
- package/internals/models/props/time.d.ts +1 -1
- package/internals/utils/date-time-utils.d.ts +1 -1
- package/internals/utils/date-time-utils.js +5 -5
- package/internals/utils/date-utils.d.ts +11 -11
- package/internals/utils/date-utils.js +34 -34
- package/internals/utils/getDefaultReferenceDate.d.ts +2 -2
- package/internals/utils/getDefaultReferenceDate.js +16 -16
- package/internals/utils/time-utils.d.ts +5 -5
- package/internals/utils/time-utils.js +12 -12
- package/internals/utils/valueManagers.js +4 -4
- package/managers/useDateManager.js +12 -12
- package/managers/useDateTimeManager.js +13 -13
- package/managers/useTimeManager.js +10 -11
- package/package.json +2 -2
- package/validation/useValidation.d.ts +2 -3
- package/validation/useValidation.js +2 -2
- package/validation/validateDate.js +6 -6
- package/validation/validateTime.js +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,208 @@
|
|
|
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.6.0
|
|
9
|
+
|
|
10
|
+
_Jun 27, 2025_
|
|
11
|
+
|
|
12
|
+
We'd like to extend a big thank you to the 12 contributors who made this release possible. Here are some highlights ✨:
|
|
13
|
+
|
|
14
|
+
- 📊 Add export menu to charts toolbar
|
|
15
|
+
- 📅 Add `usePickerAdapter` hook to access the date adapter.
|
|
16
|
+
|
|
17
|
+
You can use the adapter in your custom components if you need them to work with multiple date libraries — [Learn more](https://mui.com/x/react-date-pickers/custom-components/#access-date-adapter).
|
|
18
|
+
- 🌎 Improve Danish (da-DK) locale
|
|
19
|
+
- 🌎 Improve German (de-DE) locale
|
|
20
|
+
|
|
21
|
+
Special thanks go out to the community members for their valuable contributions:
|
|
22
|
+
@ShahrazH, @vadimka123
|
|
23
|
+
|
|
24
|
+
The following are all team members who have contributed to this release:
|
|
25
|
+
@arminmeh, @bernardobelchior, @JCQuintas, @KenanYusuf, @LukasTy, @MBilalShafi, @michelengelen, @noraleonte, @rita-codes, @sai6855
|
|
26
|
+
|
|
27
|
+
### Data Grid
|
|
28
|
+
|
|
29
|
+
#### `@mui/x-data-grid@8.6.0`
|
|
30
|
+
|
|
31
|
+
- [DataGrid] Fix `label` type in `GridActionsCellItem` type (#18175) @sai6855
|
|
32
|
+
- [DataGrid] Fix grid menu not closing when pressing escape/tab (#18300) @KenanYusuf
|
|
33
|
+
- [l10n] Improve Danish (da-DK) locale (#18428) @ShahrazH
|
|
34
|
+
- [l10n] Improve German (de-DE) locale (#18388) @omalyutin
|
|
35
|
+
|
|
36
|
+
#### `@mui/x-data-grid-pro@8.6.0` [](https://mui.com/r/x-pro-svg-link "Pro plan")
|
|
37
|
+
|
|
38
|
+
Same changes as in `@mui/x-data-grid@8.6.0`, plus:
|
|
39
|
+
|
|
40
|
+
- [DataGridPro] Fix lazy loading params calculated from rendering context (#18460) @arminmeh
|
|
41
|
+
|
|
42
|
+
#### `@mui/x-data-grid-premium@8.6.0` [](https://mui.com/r/x-premium-svg-link "Premium plan")
|
|
43
|
+
|
|
44
|
+
Same changes as in `@mui/x-data-grid-pro@8.6.0`.
|
|
45
|
+
|
|
46
|
+
### Date and Time Pickers
|
|
47
|
+
|
|
48
|
+
#### `@mui/x-date-pickers@8.6.0`
|
|
49
|
+
|
|
50
|
+
- [pickers] Add `usePickerAdapter` hook (#18457) @LukasTy
|
|
51
|
+
- [pickers] Fix to use latest `value` when updating `lastCommittedValue` in internal state (#18518) @LukasTy
|
|
52
|
+
- [pickers] Use `usePickerAdapter` hook internally instead of `useUtils` (#18465) @LukasTy
|
|
53
|
+
|
|
54
|
+
#### `@mui/x-date-pickers-pro@8.6.0` [](https://mui.com/r/x-pro-svg-link "Pro plan")
|
|
55
|
+
|
|
56
|
+
Same changes as in `@mui/x-date-pickers@8.6.0`.
|
|
57
|
+
|
|
58
|
+
### Charts
|
|
59
|
+
|
|
60
|
+
#### `@mui/x-charts@8.6.0`
|
|
61
|
+
|
|
62
|
+
- [charts] Add `data-series` to charts legend item (#18414) @bernardobelchior
|
|
63
|
+
- [charts] Add `data-series` to bar charts (#18413) @bernardobelchior
|
|
64
|
+
- [charts] Add `data-series` to elements of line chart (#18409) @bernardobelchior
|
|
65
|
+
- [charts] Add `data-series` to pie charts (#18432) @bernardobelchior
|
|
66
|
+
- [charts] Fix missing key in bar plot (#18502) @bernardobelchior
|
|
67
|
+
- [charts] Split axis utils from main file (#18517) @JCQuintas
|
|
68
|
+
- [charts] Improve touch behavior for polar axis (#18531) @JCQuintas
|
|
69
|
+
- [charts] Add `isElementInside` helper (#18530) @JCQuintas
|
|
70
|
+
|
|
71
|
+
#### `@mui/x-charts-pro@8.6.0` [](https://mui.com/r/x-pro-svg-link "Pro plan")
|
|
72
|
+
|
|
73
|
+
Same changes as in `@mui/x-charts@8.6.0`, plus:
|
|
74
|
+
|
|
75
|
+
- [charts-pro] Add export menu to charts toolbar (#18210) @bernardobelchior
|
|
76
|
+
- [charts-pro] Fix export docs mentioning tooltip instead of toolbar (#18490) @bernardobelchior
|
|
77
|
+
- [charts-pro] Fix iframe not being removed after print export (#18500) @bernardobelchior
|
|
78
|
+
|
|
79
|
+
### Tree View
|
|
80
|
+
|
|
81
|
+
#### `@mui/x-tree-view@8.6.0`
|
|
82
|
+
|
|
83
|
+
Internal changes.
|
|
84
|
+
|
|
85
|
+
#### `@mui/x-tree-view-pro@8.6.0` [](https://mui.com/r/x-pro-svg-link "Pro plan")
|
|
86
|
+
|
|
87
|
+
Same changes as in `@mui/x-tree-view@8.6.0`, plus:
|
|
88
|
+
|
|
89
|
+
- [tree view pro] Fix theme augmentation (#18437) @LukasTy
|
|
90
|
+
|
|
91
|
+
### Codemod
|
|
92
|
+
|
|
93
|
+
#### `@mui/x-codemod@8.6.0`
|
|
94
|
+
|
|
95
|
+
Internal changes.
|
|
96
|
+
|
|
97
|
+
### Docs
|
|
98
|
+
|
|
99
|
+
- [docs] Document `GridRenderContext` (#18492) @arminmeh
|
|
100
|
+
- [docs] Prevent stale rows to appear on sort and filter change in the lazy loading demo (#18461) @arminmeh
|
|
101
|
+
- [docs][pickers] Update action bar demo to use the `nextOrAccept` action (#18505) @LukasTy
|
|
102
|
+
- [docs] Update indeterminate checkbox section in migration guide (#18229) @michelengelen
|
|
103
|
+
- [docs] Data source nested pagination recipe (#14777) @MBilalShafi
|
|
104
|
+
|
|
105
|
+
### Core
|
|
106
|
+
|
|
107
|
+
- [core] Avoid json stringify whole window object (#18512) @vadimka123
|
|
108
|
+
|
|
109
|
+
### Miscellaneous
|
|
110
|
+
|
|
111
|
+
- [code-infra] Dynamically get pickers adapters dependencies versions (#18446) @JCQuintas
|
|
112
|
+
- [infra] Adjust inquirer version and usage (#18495) @michelengelen
|
|
113
|
+
- [infra] Use `String.raw` for creating the remote regex (#18462) @michelengelen
|
|
114
|
+
|
|
115
|
+
## 8.5.3
|
|
116
|
+
|
|
117
|
+
_Jun 19, 2025_
|
|
118
|
+
|
|
119
|
+
We'd like to extend a big thank you to the 10 contributors who made this release possible. Here are some highlights ✨:
|
|
120
|
+
|
|
121
|
+
- 📚 Documentation improvements
|
|
122
|
+
- 🐞 Bugfixes
|
|
123
|
+
|
|
124
|
+
Special thanks go out to the community members for their valuable contributions:
|
|
125
|
+
@alisasanib, @arminmeh, @sai6855
|
|
126
|
+
|
|
127
|
+
The following are all team members who have contributed to this release:
|
|
128
|
+
@alexfauquette, @bernardobelchior, @flaviendelangle, @JCQuintas, @LukasTy, @MBilalShafi, @oliviertassinari
|
|
129
|
+
|
|
130
|
+
### Data Grid
|
|
131
|
+
|
|
132
|
+
#### `@mui/x-data-grid@8.5.3`
|
|
133
|
+
|
|
134
|
+
- [DataGrid] Fix export menu button tooltip being interactive when menu is open (#18327) @bernardobelchior
|
|
135
|
+
- [DataGrid] Fix column menu scroll close (#18065) @alisasanib
|
|
136
|
+
- [DataGrid] Fix page size issue with data source (#18419) @MBilalShafi
|
|
137
|
+
|
|
138
|
+
#### `@mui/x-data-grid-pro@8.5.3` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
139
|
+
|
|
140
|
+
Same changes as in `@mui/x-data-grid@8.5.3`, plus:
|
|
141
|
+
|
|
142
|
+
- [DataGridPro] Ignore missing `rowCount` response when new children are fetched with the data source (#17711) @arminmeh
|
|
143
|
+
|
|
144
|
+
#### `@mui/x-data-grid-premium@8.5.3` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
145
|
+
|
|
146
|
+
Same changes as in `@mui/x-data-grid-pro@8.5.3`.
|
|
147
|
+
|
|
148
|
+
### Date and Time Pickers
|
|
149
|
+
|
|
150
|
+
#### `@mui/x-date-pickers@8.5.3`
|
|
151
|
+
|
|
152
|
+
- [pickers] Add `inputSizeSmall` to classes interface (#18242) @sai6855
|
|
153
|
+
|
|
154
|
+
#### `@mui/x-date-pickers-pro@8.5.3` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
155
|
+
|
|
156
|
+
Same changes as in `@mui/x-date-pickers@8.5.3`.
|
|
157
|
+
|
|
158
|
+
### Charts
|
|
159
|
+
|
|
160
|
+
#### `@mui/x-charts@8.5.3`
|
|
161
|
+
|
|
162
|
+
- [charts] Add item class to list item around each series in legend (#18411) @bernardobelchior
|
|
163
|
+
- [charts] Allow `tabIndex` in surface and legend (#18344) @JCQuintas
|
|
164
|
+
- [charts] Explore selector typing (#18362) @alexfauquette
|
|
165
|
+
- [charts] Fix highlight with number ids (#18423) @alexfauquette
|
|
166
|
+
- [charts] Make scatter chart use data attributes (#18048) @alexfauquette
|
|
167
|
+
|
|
168
|
+
#### `@mui/x-charts-pro@8.5.3` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
169
|
+
|
|
170
|
+
Same changes as in `@mui/x-charts@8.5.3`, plus:
|
|
171
|
+
|
|
172
|
+
- [charts-pro] Add data-series to elements of funnel chart (#18067) @JCQuintas
|
|
173
|
+
- [charts-pro] Hide values outside minStart and maxEnd in zoom slider (#18336) @bernardobelchior
|
|
174
|
+
- [charts-pro] Fix `FunnelChart` label positioning with different curves (#18354) @JCQuintas
|
|
175
|
+
|
|
176
|
+
### Tree View
|
|
177
|
+
|
|
178
|
+
#### `@mui/x-tree-view@8.5.3`
|
|
179
|
+
|
|
180
|
+
Internal changes.
|
|
181
|
+
|
|
182
|
+
#### `@mui/x-tree-view-pro@8.5.3` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
183
|
+
|
|
184
|
+
Same changes as in `@mui/x-tree-view@8.5.3`.
|
|
185
|
+
|
|
186
|
+
### Codemod
|
|
187
|
+
|
|
188
|
+
#### `@mui/x-codemod@8.5.3`
|
|
189
|
+
|
|
190
|
+
Internal changes.
|
|
191
|
+
|
|
192
|
+
### Docs
|
|
193
|
+
|
|
194
|
+
- [docs] Fix 404 in charts docs (#18440) @alexfauquette
|
|
195
|
+
- [docs][pickers] Fix adapter version resolving when opening demo to edit (#18363) @LukasTy
|
|
196
|
+
|
|
197
|
+
### Core
|
|
198
|
+
|
|
199
|
+
- [core] Fix pnpm valelint error (#18420) @oliviertassinari
|
|
200
|
+
|
|
201
|
+
### Miscellaneous
|
|
202
|
+
|
|
203
|
+
- [code-infra] Add back a `Playwright` renovate group (#18397) @LukasTy
|
|
204
|
+
- [code-infra] Setup `CODEOWNERS` for charts repositories (#18418) @JCQuintas
|
|
205
|
+
- [code-infra] Strengthen `URL` usage for test config (#18444) @LukasTy
|
|
206
|
+
- [code-infra] Use `vitest` bundled types (#17758) @JCQuintas
|
|
207
|
+
- [infra] Stabilise tests by removing babel and plugins from vitest (#18341) @JCQuintas
|
|
208
|
+
- [infra] Add automated release PR creation script (#18345) @michelengelen
|
|
209
|
+
|
|
8
210
|
## 8.5.2
|
|
9
211
|
|
|
10
212
|
_Jun 12, 2025_
|
|
@@ -94,7 +296,7 @@ Same changes as in `@mui/x-tree-view@8.5.2`.
|
|
|
94
296
|
- [code-infra] Revert `React` to `19.0.0` (#18265) @LukasTy
|
|
95
297
|
- [code-infra] Use `catalog` for reused dependencies (#18302) @LukasTy
|
|
96
298
|
- [infra] Remove unused karma/mocha deps and files (#18340) @JCQuintas
|
|
97
|
-
- [infra] Update
|
|
299
|
+
- [infra] Update GitHub label references to use 'scope' instead of 'component' (#18260) @michelengelen
|
|
98
300
|
- [infra] Use a single browser server in CI (#18230) @JCQuintas
|
|
99
301
|
|
|
100
302
|
## 8.5.1
|
|
@@ -189,15 +391,6 @@ Same changes as in `@mui/x-tree-view@8.5.1`.
|
|
|
189
391
|
|
|
190
392
|
### Core
|
|
191
393
|
|
|
192
|
-
- chore(deps): bump @next/eslint-plugin-next to 15.3.3 (#18155) @renovate[bot]
|
|
193
|
-
- chore(deps): bump @types/lodash to ^4.17.17 (#17990) @renovate[bot]
|
|
194
|
-
- chore(deps): bump babel (#18157) @renovate[bot]
|
|
195
|
-
- chore(deps): bump eslint to ^9.28.0 (#17352) @renovate[bot]
|
|
196
|
-
- chore(deps): bump material ui (#17802) @renovate[bot]
|
|
197
|
-
- chore(deps): bump next to ^15.3.3 (#18159) @renovate[bot]
|
|
198
|
-
- chore(deps): bump ossf/scorecard-action action to v2.4.2 (#18160) @renovate[bot]
|
|
199
|
-
- chore(deps): bump react-router to ^7.6.1 (#18162) @renovate[bot]
|
|
200
|
-
- chore(deps): bump yargs to ^18.0.0 (#18169) @renovate[bot]
|
|
201
394
|
- [code-infra] Different approach to console testing for `processRowUpdate` (#18213) @JCQuintas
|
|
202
395
|
- [code-infra] Fix act warnings in DataGrid/toolbar (#18207) @JCQuintas
|
|
203
396
|
- [code-infra] Remove `istanbul` references (#18194) @JCQuintas
|
|
@@ -4641,7 +4834,6 @@ No changes since `@mui/x-charts@7.22.2`.
|
|
|
4641
4834
|
- [docs] Add `next` version links (#15423) @LukasTy
|
|
4642
4835
|
- [docs] Use the `loading` state in the demos (#15538) @cherniavskii
|
|
4643
4836
|
- [docs] Add data caching to lazy loaded detail panel demo (#15506) @cherniavskii
|
|
4644
|
-
|
|
4645
4837
|
- [code-infra] Tentative fix for Argos flaky screenshot tests (#15399) @JCQuintas
|
|
4646
4838
|
- [docs-infra] Transpile `.ts` demo files (#15421) @KenanYusuf
|
|
4647
4839
|
- [core] Clarify release version bump strategy (#15536) @cherniavskii
|
|
@@ -18,7 +18,6 @@ var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"
|
|
|
18
18
|
var _useId = _interopRequireDefault(require("@mui/utils/useId"));
|
|
19
19
|
var _useEventCallback = _interopRequireDefault(require("@mui/utils/useEventCallback"));
|
|
20
20
|
var _useCalendarState = require("./useCalendarState");
|
|
21
|
-
var _useUtils = require("../internals/hooks/useUtils");
|
|
22
21
|
var _PickersFadeTransitionGroup = require("./PickersFadeTransitionGroup");
|
|
23
22
|
var _DayCalendar = require("./DayCalendar");
|
|
24
23
|
var _MonthCalendar = require("../MonthCalendar");
|
|
@@ -34,6 +33,7 @@ var _valueManagers = require("../internals/utils/valueManagers");
|
|
|
34
33
|
var _dimensions = require("../internals/constants/dimensions");
|
|
35
34
|
var _usePickerPrivateContext = require("../internals/hooks/usePickerPrivateContext");
|
|
36
35
|
var _useDateManager = require("../managers/useDateManager");
|
|
36
|
+
var _usePickerAdapter = require("../hooks/usePickerAdapter");
|
|
37
37
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
38
38
|
const _excluded = ["autoFocus", "onViewChange", "value", "defaultValue", "referenceDate", "disableFuture", "disablePast", "onChange", "onYearChange", "onMonthChange", "reduceAnimations", "shouldDisableDate", "shouldDisableMonth", "shouldDisableYear", "view", "views", "openTo", "className", "classes", "disabled", "readOnly", "minDate", "maxDate", "disableHighlightToday", "focusedView", "onFocusedViewChange", "showDaysOutsideCurrentMonth", "fixedWeekNumber", "dayOfWeekFormatter", "slots", "slotProps", "loading", "renderLoading", "displayWeekNumber", "yearsOrder", "yearsPerRow", "monthsPerRow", "timezone"];
|
|
39
39
|
const useUtilityClasses = classes => {
|
|
@@ -84,7 +84,7 @@ const DateCalendarViewTransitionContainer = (0, _styles.styled)(_PickersFadeTran
|
|
|
84
84
|
* - [DateCalendar API](https://mui.com/x/api/date-pickers/date-calendar/)
|
|
85
85
|
*/
|
|
86
86
|
const DateCalendar = exports.DateCalendar = /*#__PURE__*/React.forwardRef(function DateCalendar(inProps, ref) {
|
|
87
|
-
const
|
|
87
|
+
const adapter = (0, _usePickerAdapter.usePickerAdapter)();
|
|
88
88
|
const {
|
|
89
89
|
ownerState
|
|
90
90
|
} = (0, _usePickerPrivateContext.usePickerPrivateContext)();
|
|
@@ -178,10 +178,10 @@ const DateCalendar = exports.DateCalendar = /*#__PURE__*/React.forwardRef(functi
|
|
|
178
178
|
disableFuture,
|
|
179
179
|
timezone,
|
|
180
180
|
getCurrentMonthFromVisibleDate: (visibleDate, prevMonth) => {
|
|
181
|
-
if (
|
|
181
|
+
if (adapter.isSameMonth(visibleDate, prevMonth)) {
|
|
182
182
|
return prevMonth;
|
|
183
183
|
}
|
|
184
|
-
return
|
|
184
|
+
return adapter.startOfMonth(visibleDate);
|
|
185
185
|
}
|
|
186
186
|
});
|
|
187
187
|
|
|
@@ -215,13 +215,13 @@ const DateCalendar = exports.DateCalendar = /*#__PURE__*/React.forwardRef(functi
|
|
|
215
215
|
ownerState
|
|
216
216
|
});
|
|
217
217
|
const handleDateMonthChange = (0, _useEventCallback.default)(newDate => {
|
|
218
|
-
const startOfMonth =
|
|
219
|
-
const endOfMonth =
|
|
218
|
+
const startOfMonth = adapter.startOfMonth(newDate);
|
|
219
|
+
const endOfMonth = adapter.endOfMonth(newDate);
|
|
220
220
|
const closestEnabledDate = isDateDisabled(newDate) ? (0, _dateUtils.findClosestEnabledDate)({
|
|
221
|
-
|
|
221
|
+
adapter,
|
|
222
222
|
date: newDate,
|
|
223
|
-
minDate:
|
|
224
|
-
maxDate:
|
|
223
|
+
minDate: adapter.isBefore(minDate, startOfMonth) ? startOfMonth : minDate,
|
|
224
|
+
maxDate: adapter.isAfter(maxDate, endOfMonth) ? endOfMonth : maxDate,
|
|
225
225
|
disablePast,
|
|
226
226
|
disableFuture,
|
|
227
227
|
isDateDisabled,
|
|
@@ -242,13 +242,13 @@ const DateCalendar = exports.DateCalendar = /*#__PURE__*/React.forwardRef(functi
|
|
|
242
242
|
}
|
|
243
243
|
});
|
|
244
244
|
const handleDateYearChange = (0, _useEventCallback.default)(newDate => {
|
|
245
|
-
const startOfYear =
|
|
246
|
-
const endOfYear =
|
|
245
|
+
const startOfYear = adapter.startOfYear(newDate);
|
|
246
|
+
const endOfYear = adapter.endOfYear(newDate);
|
|
247
247
|
const closestEnabledDate = isDateDisabled(newDate) ? (0, _dateUtils.findClosestEnabledDate)({
|
|
248
|
-
|
|
248
|
+
adapter,
|
|
249
249
|
date: newDate,
|
|
250
|
-
minDate:
|
|
251
|
-
maxDate:
|
|
250
|
+
minDate: adapter.isBefore(minDate, startOfYear) ? startOfYear : minDate,
|
|
251
|
+
maxDate: adapter.isAfter(maxDate, endOfYear) ? endOfYear : maxDate,
|
|
252
252
|
disablePast,
|
|
253
253
|
disableFuture,
|
|
254
254
|
isDateDisabled,
|
|
@@ -271,12 +271,12 @@ const DateCalendar = exports.DateCalendar = /*#__PURE__*/React.forwardRef(functi
|
|
|
271
271
|
const handleSelectedDayChange = (0, _useEventCallback.default)(day => {
|
|
272
272
|
if (day) {
|
|
273
273
|
// If there is a date already selected, then we want to keep its time
|
|
274
|
-
return handleValueChange((0, _dateUtils.mergeDateAndTime)(
|
|
274
|
+
return handleValueChange((0, _dateUtils.mergeDateAndTime)(adapter, day, value ?? referenceDate), 'finish', view);
|
|
275
275
|
}
|
|
276
276
|
return handleValueChange(day, 'finish', view);
|
|
277
277
|
});
|
|
278
278
|
React.useEffect(() => {
|
|
279
|
-
if (
|
|
279
|
+
if (adapter.isValid(value)) {
|
|
280
280
|
setVisibleDate({
|
|
281
281
|
target: value,
|
|
282
282
|
reason: 'controlled-value-change'
|
|
@@ -18,7 +18,7 @@ var _styles = require("@mui/material/styles");
|
|
|
18
18
|
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
19
19
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
20
20
|
var _PickersDay = require("../PickersDay");
|
|
21
|
-
var
|
|
21
|
+
var _hooks = require("../hooks");
|
|
22
22
|
var _useUtils = require("../internals/hooks/useUtils");
|
|
23
23
|
var _dimensions = require("../internals/constants/dimensions");
|
|
24
24
|
var _PickersSlideTransition = require("./PickersSlideTransition");
|
|
@@ -151,14 +151,14 @@ function WrappedDay(_ref) {
|
|
|
151
151
|
slotProps,
|
|
152
152
|
timezone
|
|
153
153
|
} = parentProps;
|
|
154
|
-
const
|
|
154
|
+
const adapter = (0, _hooks.usePickerAdapter)();
|
|
155
155
|
const now = (0, _useUtils.useNow)(timezone);
|
|
156
|
-
const isFocusableDay = focusedDay != null &&
|
|
156
|
+
const isFocusableDay = focusedDay != null && adapter.isSameDay(day, focusedDay);
|
|
157
157
|
const isFocusedDay = isViewFocused && isFocusableDay;
|
|
158
|
-
const isSelected = selectedDays.some(selectedDay =>
|
|
159
|
-
const isToday =
|
|
158
|
+
const isSelected = selectedDays.some(selectedDay => adapter.isSameDay(selectedDay, day));
|
|
159
|
+
const isToday = adapter.isSameDay(day, now);
|
|
160
160
|
const isDisabled = React.useMemo(() => disabled || isDateDisabled(day), [disabled, isDateDisabled, day]);
|
|
161
|
-
const isOutsideCurrentMonth = React.useMemo(() =>
|
|
161
|
+
const isOutsideCurrentMonth = React.useMemo(() => adapter.getMonth(day) !== currentMonthNumber, [adapter, day, currentMonthNumber]);
|
|
162
162
|
const ownerState = (0, _usePickerDayOwnerState.usePickerDayOwnerState)({
|
|
163
163
|
day,
|
|
164
164
|
selected: isSelected,
|
|
@@ -181,7 +181,7 @@ function WrappedDay(_ref) {
|
|
|
181
181
|
role: 'gridcell',
|
|
182
182
|
isAnimating: isMonthSwitchingAnimating,
|
|
183
183
|
// it is used in date range dragging logic by accessing `dataset.timestamp`
|
|
184
|
-
'data-timestamp':
|
|
184
|
+
'data-timestamp': adapter.toJsDate(day).valueOf()
|
|
185
185
|
}, other),
|
|
186
186
|
ownerState: (0, _extends2.default)({}, ownerState, {
|
|
187
187
|
day,
|
|
@@ -191,19 +191,19 @@ function WrappedDay(_ref) {
|
|
|
191
191
|
}),
|
|
192
192
|
dayProps = (0, _objectWithoutPropertiesLoose2.default)(_useSlotProps, _excluded2);
|
|
193
193
|
const isFirstVisibleCell = React.useMemo(() => {
|
|
194
|
-
const startOfMonth =
|
|
194
|
+
const startOfMonth = adapter.startOfMonth(adapter.setMonth(day, currentMonthNumber));
|
|
195
195
|
if (!showDaysOutsideCurrentMonth) {
|
|
196
|
-
return
|
|
196
|
+
return adapter.isSameDay(day, startOfMonth);
|
|
197
197
|
}
|
|
198
|
-
return
|
|
199
|
-
}, [currentMonthNumber, day, showDaysOutsideCurrentMonth,
|
|
198
|
+
return adapter.isSameDay(day, adapter.startOfWeek(startOfMonth));
|
|
199
|
+
}, [currentMonthNumber, day, showDaysOutsideCurrentMonth, adapter]);
|
|
200
200
|
const isLastVisibleCell = React.useMemo(() => {
|
|
201
|
-
const endOfMonth =
|
|
201
|
+
const endOfMonth = adapter.endOfMonth(adapter.setMonth(day, currentMonthNumber));
|
|
202
202
|
if (!showDaysOutsideCurrentMonth) {
|
|
203
|
-
return
|
|
203
|
+
return adapter.isSameDay(day, endOfMonth);
|
|
204
204
|
}
|
|
205
|
-
return
|
|
206
|
-
}, [currentMonthNumber, day, showDaysOutsideCurrentMonth,
|
|
205
|
+
return adapter.isSameDay(day, adapter.endOfWeek(endOfMonth));
|
|
206
|
+
}, [currentMonthNumber, day, showDaysOutsideCurrentMonth, adapter]);
|
|
207
207
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Day, (0, _extends2.default)({}, dayProps, {
|
|
208
208
|
day: day,
|
|
209
209
|
disabled: isDisabled,
|
|
@@ -227,7 +227,7 @@ function DayCalendar(inProps) {
|
|
|
227
227
|
props: inProps,
|
|
228
228
|
name: 'MuiDayCalendar'
|
|
229
229
|
});
|
|
230
|
-
const
|
|
230
|
+
const adapter = (0, _hooks.usePickerAdapter)();
|
|
231
231
|
const {
|
|
232
232
|
onFocusedDayChange,
|
|
233
233
|
className,
|
|
@@ -252,7 +252,7 @@ function DayCalendar(inProps) {
|
|
|
252
252
|
shouldDisableDate,
|
|
253
253
|
shouldDisableMonth,
|
|
254
254
|
shouldDisableYear,
|
|
255
|
-
dayOfWeekFormatter = date =>
|
|
255
|
+
dayOfWeekFormatter = date => adapter.format(date, 'weekdayShort').charAt(0).toUpperCase(),
|
|
256
256
|
hasFocus,
|
|
257
257
|
onFocusedViewChange,
|
|
258
258
|
gridLabelId,
|
|
@@ -273,7 +273,7 @@ function DayCalendar(inProps) {
|
|
|
273
273
|
disableFuture,
|
|
274
274
|
timezone
|
|
275
275
|
});
|
|
276
|
-
const translations = (0,
|
|
276
|
+
const translations = (0, _hooks.usePickerTranslations)();
|
|
277
277
|
const handleDaySelect = (0, _useEventCallback.default)(day => {
|
|
278
278
|
if (readOnly) {
|
|
279
279
|
return;
|
|
@@ -289,22 +289,22 @@ function DayCalendar(inProps) {
|
|
|
289
289
|
const handleKeyDown = (0, _useEventCallback.default)((event, day) => {
|
|
290
290
|
switch (event.key) {
|
|
291
291
|
case 'ArrowUp':
|
|
292
|
-
focusDay(
|
|
292
|
+
focusDay(adapter.addDays(day, -7));
|
|
293
293
|
event.preventDefault();
|
|
294
294
|
break;
|
|
295
295
|
case 'ArrowDown':
|
|
296
|
-
focusDay(
|
|
296
|
+
focusDay(adapter.addDays(day, 7));
|
|
297
297
|
event.preventDefault();
|
|
298
298
|
break;
|
|
299
299
|
case 'ArrowLeft':
|
|
300
300
|
{
|
|
301
|
-
const newFocusedDayDefault =
|
|
302
|
-
const nextAvailableMonth =
|
|
301
|
+
const newFocusedDayDefault = adapter.addDays(day, isRtl ? 1 : -1);
|
|
302
|
+
const nextAvailableMonth = adapter.addMonths(day, isRtl ? 1 : -1);
|
|
303
303
|
const closestDayToFocus = (0, _dateUtils.findClosestEnabledDate)({
|
|
304
|
-
|
|
304
|
+
adapter,
|
|
305
305
|
date: newFocusedDayDefault,
|
|
306
|
-
minDate: isRtl ? newFocusedDayDefault :
|
|
307
|
-
maxDate: isRtl ?
|
|
306
|
+
minDate: isRtl ? newFocusedDayDefault : adapter.startOfMonth(nextAvailableMonth),
|
|
307
|
+
maxDate: isRtl ? adapter.endOfMonth(nextAvailableMonth) : newFocusedDayDefault,
|
|
308
308
|
isDateDisabled,
|
|
309
309
|
timezone
|
|
310
310
|
});
|
|
@@ -314,13 +314,13 @@ function DayCalendar(inProps) {
|
|
|
314
314
|
}
|
|
315
315
|
case 'ArrowRight':
|
|
316
316
|
{
|
|
317
|
-
const newFocusedDayDefault =
|
|
318
|
-
const nextAvailableMonth =
|
|
317
|
+
const newFocusedDayDefault = adapter.addDays(day, isRtl ? -1 : 1);
|
|
318
|
+
const nextAvailableMonth = adapter.addMonths(day, isRtl ? -1 : 1);
|
|
319
319
|
const closestDayToFocus = (0, _dateUtils.findClosestEnabledDate)({
|
|
320
|
-
|
|
320
|
+
adapter,
|
|
321
321
|
date: newFocusedDayDefault,
|
|
322
|
-
minDate: isRtl ?
|
|
323
|
-
maxDate: isRtl ? newFocusedDayDefault :
|
|
322
|
+
minDate: isRtl ? adapter.startOfMonth(nextAvailableMonth) : newFocusedDayDefault,
|
|
323
|
+
maxDate: isRtl ? newFocusedDayDefault : adapter.endOfMonth(nextAvailableMonth),
|
|
324
324
|
isDateDisabled,
|
|
325
325
|
timezone
|
|
326
326
|
});
|
|
@@ -329,19 +329,19 @@ function DayCalendar(inProps) {
|
|
|
329
329
|
break;
|
|
330
330
|
}
|
|
331
331
|
case 'Home':
|
|
332
|
-
focusDay(
|
|
332
|
+
focusDay(adapter.startOfWeek(day));
|
|
333
333
|
event.preventDefault();
|
|
334
334
|
break;
|
|
335
335
|
case 'End':
|
|
336
|
-
focusDay(
|
|
336
|
+
focusDay(adapter.endOfWeek(day));
|
|
337
337
|
event.preventDefault();
|
|
338
338
|
break;
|
|
339
339
|
case 'PageUp':
|
|
340
|
-
focusDay(
|
|
340
|
+
focusDay(adapter.addMonths(day, 1));
|
|
341
341
|
event.preventDefault();
|
|
342
342
|
break;
|
|
343
343
|
case 'PageDown':
|
|
344
|
-
focusDay(
|
|
344
|
+
focusDay(adapter.addMonths(day, -1));
|
|
345
345
|
event.preventDefault();
|
|
346
346
|
break;
|
|
347
347
|
default:
|
|
@@ -350,33 +350,33 @@ function DayCalendar(inProps) {
|
|
|
350
350
|
});
|
|
351
351
|
const handleFocus = (0, _useEventCallback.default)((event, day) => focusDay(day));
|
|
352
352
|
const handleBlur = (0, _useEventCallback.default)((event, day) => {
|
|
353
|
-
if (focusedDay != null &&
|
|
353
|
+
if (focusedDay != null && adapter.isSameDay(focusedDay, day)) {
|
|
354
354
|
onFocusedViewChange?.(false);
|
|
355
355
|
}
|
|
356
356
|
});
|
|
357
|
-
const currentMonthNumber =
|
|
358
|
-
const currentYearNumber =
|
|
359
|
-
const validSelectedDays = React.useMemo(() => selectedDays.filter(day => !!day).map(day =>
|
|
357
|
+
const currentMonthNumber = adapter.getMonth(currentMonth);
|
|
358
|
+
const currentYearNumber = adapter.getYear(currentMonth);
|
|
359
|
+
const validSelectedDays = React.useMemo(() => selectedDays.filter(day => !!day).map(day => adapter.startOfDay(day)), [adapter, selectedDays]);
|
|
360
360
|
|
|
361
361
|
// need a new ref whenever the `key` of the transition changes: https://reactcommunity.org/react-transition-group/transition/#Transition-prop-nodeRef.
|
|
362
362
|
const transitionKey = `${currentYearNumber}-${currentMonthNumber}`;
|
|
363
363
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
364
364
|
const slideNodeRef = React.useMemo(() => /*#__PURE__*/React.createRef(), [transitionKey]);
|
|
365
365
|
const weeksToDisplay = React.useMemo(() => {
|
|
366
|
-
const toDisplay =
|
|
367
|
-
let nextMonth =
|
|
366
|
+
const toDisplay = adapter.getWeekArray(currentMonth);
|
|
367
|
+
let nextMonth = adapter.addMonths(currentMonth, 1);
|
|
368
368
|
while (fixedWeekNumber && toDisplay.length < fixedWeekNumber) {
|
|
369
|
-
const additionalWeeks =
|
|
370
|
-
const hasCommonWeek =
|
|
369
|
+
const additionalWeeks = adapter.getWeekArray(nextMonth);
|
|
370
|
+
const hasCommonWeek = adapter.isSameDay(toDisplay[toDisplay.length - 1][0], additionalWeeks[0][0]);
|
|
371
371
|
additionalWeeks.slice(hasCommonWeek ? 1 : 0).forEach(week => {
|
|
372
372
|
if (toDisplay.length < fixedWeekNumber) {
|
|
373
373
|
toDisplay.push(week);
|
|
374
374
|
}
|
|
375
375
|
});
|
|
376
|
-
nextMonth =
|
|
376
|
+
nextMonth = adapter.addMonths(nextMonth, 1);
|
|
377
377
|
}
|
|
378
378
|
return toDisplay;
|
|
379
|
-
}, [currentMonth, fixedWeekNumber,
|
|
379
|
+
}, [currentMonth, fixedWeekNumber, adapter]);
|
|
380
380
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(PickersCalendarDayRoot, {
|
|
381
381
|
role: "grid",
|
|
382
382
|
"aria-labelledby": gridLabelId,
|
|
@@ -390,10 +390,10 @@ function DayCalendar(inProps) {
|
|
|
390
390
|
"aria-label": translations.calendarWeekNumberHeaderLabel,
|
|
391
391
|
className: classes.weekNumberLabel,
|
|
392
392
|
children: translations.calendarWeekNumberHeaderText
|
|
393
|
-
}), (0, _dateUtils.getWeekdays)(
|
|
393
|
+
}), (0, _dateUtils.getWeekdays)(adapter, now).map((weekday, i) => /*#__PURE__*/(0, _jsxRuntime.jsx)(PickersCalendarWeekDayLabel, {
|
|
394
394
|
variant: "caption",
|
|
395
395
|
role: "columnheader",
|
|
396
|
-
"aria-label":
|
|
396
|
+
"aria-label": adapter.format(weekday, 'weekday'),
|
|
397
397
|
className: classes.weekDayLabel,
|
|
398
398
|
children: dayOfWeekFormatter(weekday)
|
|
399
399
|
}, i.toString()))]
|
|
@@ -422,8 +422,8 @@ function DayCalendar(inProps) {
|
|
|
422
422
|
children: [displayWeekNumber && /*#__PURE__*/(0, _jsxRuntime.jsx)(PickersCalendarWeekNumber, {
|
|
423
423
|
className: classes.weekNumber,
|
|
424
424
|
role: "rowheader",
|
|
425
|
-
"aria-label": translations.calendarWeekNumberAriaLabelText(
|
|
426
|
-
children: translations.calendarWeekNumberText(
|
|
425
|
+
"aria-label": translations.calendarWeekNumberAriaLabelText(adapter.getWeekNumber(week[0])),
|
|
426
|
+
children: translations.calendarWeekNumberText(adapter.getWeekNumber(week[0]))
|
|
427
427
|
}), week.map((day, dayIndex) => /*#__PURE__*/(0, _jsxRuntime.jsx)(WrappedDay, {
|
|
428
428
|
parentProps: props,
|
|
429
429
|
day: day,
|