@mui/x-date-pickers 7.28.0 → 7.28.2
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 +92 -0
- package/index.js +1 -1
- package/internals/hooks/useField/useField.utils.js +8 -7
- package/modern/index.js +1 -1
- package/modern/internals/hooks/useField/useField.utils.js +8 -7
- package/node/index.js +1 -1
- package/node/internals/hooks/useField/useField.utils.js +8 -7
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,98 @@
|
|
|
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
|
+
## 7.28.2
|
|
7
|
+
|
|
8
|
+
_Mar 28, 2025_
|
|
9
|
+
|
|
10
|
+
We'd like to offer a big thanks to the 3 contributors who made this release possible. Here are some highlights ✨:
|
|
11
|
+
|
|
12
|
+
- 🐞 Bugfixes
|
|
13
|
+
|
|
14
|
+
Team members who have contributed to this release:
|
|
15
|
+
@flaviendelangle, @LukasTy, @arminmeh.
|
|
16
|
+
|
|
17
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
18
|
+
|
|
19
|
+
### Data Grid
|
|
20
|
+
|
|
21
|
+
#### `@mui/x-data-grid@7.28.2`
|
|
22
|
+
|
|
23
|
+
- [DataGrid] Fix error caused by trying to render rows that are not in the state anymore (#17117) @arminmeh
|
|
24
|
+
|
|
25
|
+
#### `@mui/x-data-grid-pro@7.28.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
26
|
+
|
|
27
|
+
Same changes as in `@mui/x-data-grid@7.28.2`.
|
|
28
|
+
|
|
29
|
+
#### `@mui/x-data-grid-premium@7.28.2` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
30
|
+
|
|
31
|
+
Same changes as in `@mui/x-data-grid-pro@7.28.2`.
|
|
32
|
+
|
|
33
|
+
### Date and Time Pickers
|
|
34
|
+
|
|
35
|
+
#### `@mui/x-date-pickers@7.28.2`
|
|
36
|
+
|
|
37
|
+
- [fields] Improve the check for year in `doesSectionFormatHaveLeadingZeros` (#17112) @flaviendelangle
|
|
38
|
+
|
|
39
|
+
#### `@mui/x-date-pickers-pro@7.28.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
40
|
+
|
|
41
|
+
Same changes as in `@mui/x-date-pickers@7.28.2`.
|
|
42
|
+
|
|
43
|
+
### Core
|
|
44
|
+
|
|
45
|
+
- [code-infra] Remove `test_regressions` step from React 18 pipeline (#17109) @LukasTy
|
|
46
|
+
|
|
47
|
+
## 7.28.1
|
|
48
|
+
|
|
49
|
+
_Mar 21, 2025_
|
|
50
|
+
|
|
51
|
+
We'd like to offer a big thanks to the 4 contributors who made this release possible. Here are some highlights ✨:
|
|
52
|
+
|
|
53
|
+
- 🐞 Bugfixes
|
|
54
|
+
|
|
55
|
+
Special thanks go out to the community contributors who have helped make this release possible:
|
|
56
|
+
@jyash97, @nusr.
|
|
57
|
+
|
|
58
|
+
Following are all team members who have contributed to this release:
|
|
59
|
+
@arminmeh, @KenanYusuf.
|
|
60
|
+
|
|
61
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
62
|
+
|
|
63
|
+
### Data Grid
|
|
64
|
+
|
|
65
|
+
#### `@mui/x-data-grid@7.28.1`
|
|
66
|
+
|
|
67
|
+
- [DataGrid] Fix error while editing rows with custom id (@arminmeh) (#17050)
|
|
68
|
+
|
|
69
|
+
#### `@mui/x-data-grid-pro@7.28.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
70
|
+
|
|
71
|
+
Same changes as in `@mui/x-data-grid@7.28.1`, plus:
|
|
72
|
+
|
|
73
|
+
- [DataGridPro] Fix header select checkbox state with `checkboxSelectionVisibleOnly` and `paginationMode="server"` (@arminmeh) (#17032)
|
|
74
|
+
|
|
75
|
+
#### `@mui/x-data-grid-premium@7.28.1` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
76
|
+
|
|
77
|
+
Same changes as in `@mui/x-data-grid-pro@7.28.1`, plus:
|
|
78
|
+
|
|
79
|
+
- [DataGridPremium] Update column state correctly when grouping mode is updated with one grouping column (@arminmeh) (#17074)
|
|
80
|
+
|
|
81
|
+
### Tree View
|
|
82
|
+
|
|
83
|
+
#### `@mui/x-tree-view@7.28.1`
|
|
84
|
+
|
|
85
|
+
Internal changes.
|
|
86
|
+
|
|
87
|
+
#### `@mui/x-tree-view-pro@7.28.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
88
|
+
|
|
89
|
+
Same changes as in `@mui/x-tree-view@7.28.1`, plus:
|
|
90
|
+
|
|
91
|
+
- [TreeView] Allow moving an item after the last children of some other item (@jyash97) (#17065)
|
|
92
|
+
|
|
93
|
+
### Docs
|
|
94
|
+
|
|
95
|
+
- [docs] Fix Data Grid advanced list view demo (#17066) @KenanYusuf
|
|
96
|
+
- [docs] Fix custom detail panel toggle state update (@nusr) (#17018)
|
|
97
|
+
|
|
6
98
|
## 7.28.0
|
|
7
99
|
|
|
8
100
|
_Mar 17, 2025_
|
package/index.js
CHANGED
|
@@ -156,8 +156,7 @@ export const adjustSectionValue = (utils, timezone, section, keyCode, sectionsVa
|
|
|
156
156
|
});
|
|
157
157
|
const getCleanValue = value => cleanDigitSectionValue(utils, value, sectionBoundaries, localizedDigits, section);
|
|
158
158
|
const step = section.type === 'minutes' && stepsAttributes?.minutesStep ? stepsAttributes.minutesStep : 1;
|
|
159
|
-
|
|
160
|
-
let newSectionValueNumber = currentSectionValue + delta * step;
|
|
159
|
+
let newSectionValueNumber;
|
|
161
160
|
if (shouldSetAbsolute) {
|
|
162
161
|
if (section.type === 'year' && !isEnd && !isStart) {
|
|
163
162
|
return utils.formatByString(utils.date(undefined, timezone), section.format);
|
|
@@ -167,6 +166,9 @@ export const adjustSectionValue = (utils, timezone, section, keyCode, sectionsVa
|
|
|
167
166
|
} else {
|
|
168
167
|
newSectionValueNumber = sectionBoundaries.maximum;
|
|
169
168
|
}
|
|
169
|
+
} else {
|
|
170
|
+
const currentSectionValue = parseInt(removeLocalizedDigits(section.value, localizedDigits), 10);
|
|
171
|
+
newSectionValueNumber = currentSectionValue + delta * step;
|
|
170
172
|
}
|
|
171
173
|
if (newSectionValueNumber % step !== 0) {
|
|
172
174
|
if (delta < 0 || isStart) {
|
|
@@ -244,12 +246,11 @@ export const doesSectionFormatHaveLeadingZeros = (utils, contentType, sectionTyp
|
|
|
244
246
|
// We can't use `changeSectionValueFormat`, because `utils.parse('1', 'YYYY')` returns `1971` instead of `1`.
|
|
245
247
|
case 'year':
|
|
246
248
|
{
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
return
|
|
249
|
+
// Remove once https://github.com/iamkun/dayjs/pull/2847 is merged and bump dayjs version
|
|
250
|
+
if (utils.lib === 'dayjs' && format === 'YY') {
|
|
251
|
+
return true;
|
|
250
252
|
}
|
|
251
|
-
|
|
252
|
-
return formatted2001 === '01';
|
|
253
|
+
return utils.formatByString(utils.setYear(now, 1), format).startsWith('0');
|
|
253
254
|
}
|
|
254
255
|
case 'month':
|
|
255
256
|
{
|
package/modern/index.js
CHANGED
|
@@ -156,8 +156,7 @@ export const adjustSectionValue = (utils, timezone, section, keyCode, sectionsVa
|
|
|
156
156
|
});
|
|
157
157
|
const getCleanValue = value => cleanDigitSectionValue(utils, value, sectionBoundaries, localizedDigits, section);
|
|
158
158
|
const step = section.type === 'minutes' && stepsAttributes?.minutesStep ? stepsAttributes.minutesStep : 1;
|
|
159
|
-
|
|
160
|
-
let newSectionValueNumber = currentSectionValue + delta * step;
|
|
159
|
+
let newSectionValueNumber;
|
|
161
160
|
if (shouldSetAbsolute) {
|
|
162
161
|
if (section.type === 'year' && !isEnd && !isStart) {
|
|
163
162
|
return utils.formatByString(utils.date(undefined, timezone), section.format);
|
|
@@ -167,6 +166,9 @@ export const adjustSectionValue = (utils, timezone, section, keyCode, sectionsVa
|
|
|
167
166
|
} else {
|
|
168
167
|
newSectionValueNumber = sectionBoundaries.maximum;
|
|
169
168
|
}
|
|
169
|
+
} else {
|
|
170
|
+
const currentSectionValue = parseInt(removeLocalizedDigits(section.value, localizedDigits), 10);
|
|
171
|
+
newSectionValueNumber = currentSectionValue + delta * step;
|
|
170
172
|
}
|
|
171
173
|
if (newSectionValueNumber % step !== 0) {
|
|
172
174
|
if (delta < 0 || isStart) {
|
|
@@ -244,12 +246,11 @@ export const doesSectionFormatHaveLeadingZeros = (utils, contentType, sectionTyp
|
|
|
244
246
|
// We can't use `changeSectionValueFormat`, because `utils.parse('1', 'YYYY')` returns `1971` instead of `1`.
|
|
245
247
|
case 'year':
|
|
246
248
|
{
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
return
|
|
249
|
+
// Remove once https://github.com/iamkun/dayjs/pull/2847 is merged and bump dayjs version
|
|
250
|
+
if (utils.lib === 'dayjs' && format === 'YY') {
|
|
251
|
+
return true;
|
|
250
252
|
}
|
|
251
|
-
|
|
252
|
-
return formatted2001 === '01';
|
|
253
|
+
return utils.formatByString(utils.setYear(now, 1), format).startsWith('0');
|
|
253
254
|
}
|
|
254
255
|
case 'month':
|
|
255
256
|
{
|
package/node/index.js
CHANGED
|
@@ -171,8 +171,7 @@ const adjustSectionValue = (utils, timezone, section, keyCode, sectionsValueBoun
|
|
|
171
171
|
});
|
|
172
172
|
const getCleanValue = value => cleanDigitSectionValue(utils, value, sectionBoundaries, localizedDigits, section);
|
|
173
173
|
const step = section.type === 'minutes' && stepsAttributes?.minutesStep ? stepsAttributes.minutesStep : 1;
|
|
174
|
-
|
|
175
|
-
let newSectionValueNumber = currentSectionValue + delta * step;
|
|
174
|
+
let newSectionValueNumber;
|
|
176
175
|
if (shouldSetAbsolute) {
|
|
177
176
|
if (section.type === 'year' && !isEnd && !isStart) {
|
|
178
177
|
return utils.formatByString(utils.date(undefined, timezone), section.format);
|
|
@@ -182,6 +181,9 @@ const adjustSectionValue = (utils, timezone, section, keyCode, sectionsValueBoun
|
|
|
182
181
|
} else {
|
|
183
182
|
newSectionValueNumber = sectionBoundaries.maximum;
|
|
184
183
|
}
|
|
184
|
+
} else {
|
|
185
|
+
const currentSectionValue = parseInt(removeLocalizedDigits(section.value, localizedDigits), 10);
|
|
186
|
+
newSectionValueNumber = currentSectionValue + delta * step;
|
|
185
187
|
}
|
|
186
188
|
if (newSectionValueNumber % step !== 0) {
|
|
187
189
|
if (delta < 0 || isStart) {
|
|
@@ -262,12 +264,11 @@ const doesSectionFormatHaveLeadingZeros = (utils, contentType, sectionType, form
|
|
|
262
264
|
// We can't use `changeSectionValueFormat`, because `utils.parse('1', 'YYYY')` returns `1971` instead of `1`.
|
|
263
265
|
case 'year':
|
|
264
266
|
{
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
return
|
|
267
|
+
// Remove once https://github.com/iamkun/dayjs/pull/2847 is merged and bump dayjs version
|
|
268
|
+
if (utils.lib === 'dayjs' && format === 'YY') {
|
|
269
|
+
return true;
|
|
268
270
|
}
|
|
269
|
-
|
|
270
|
-
return formatted2001 === '01';
|
|
271
|
+
return utils.formatByString(utils.setYear(now, 1), format).startsWith('0');
|
|
271
272
|
}
|
|
272
273
|
case 'month':
|
|
273
274
|
{
|