@mui/x-date-pickers 7.28.0 → 7.28.3
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 +136 -0
- package/LocalizationProvider/LocalizationProvider.d.ts +1 -1
- package/LocalizationProvider/LocalizationProvider.js +1 -1
- package/index.js +1 -1
- package/internals/hooks/useField/useField.utils.js +8 -7
- package/modern/LocalizationProvider/LocalizationProvider.js +1 -1
- package/modern/index.js +1 -1
- package/modern/internals/hooks/useField/useField.utils.js +8 -7
- package/node/LocalizationProvider/LocalizationProvider.js +1 -1
- 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,142 @@
|
|
|
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.3
|
|
7
|
+
|
|
8
|
+
_Apr 3, 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
|
+
@cherniavskii, @LukasTy, @MBilalShafi.
|
|
16
|
+
|
|
17
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
18
|
+
|
|
19
|
+
### Data Grid
|
|
20
|
+
|
|
21
|
+
#### `@mui/x-data-grid@7.28.3`
|
|
22
|
+
|
|
23
|
+
Internal changes.
|
|
24
|
+
|
|
25
|
+
#### `@mui/x-data-grid-pro@7.28.3` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
26
|
+
|
|
27
|
+
Same changes as in `@mui/x-data-grid@7.28.3`, plus:
|
|
28
|
+
|
|
29
|
+
- [DataGridPro] Data source: Allow expanding groups with unknown children count (#17149) @MBilalShafi
|
|
30
|
+
|
|
31
|
+
#### `@mui/x-data-grid-premium@7.28.3` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
32
|
+
|
|
33
|
+
Same changes as in `@mui/x-data-grid-pro@7.28.3`.
|
|
34
|
+
|
|
35
|
+
### Date and Time Pickers
|
|
36
|
+
|
|
37
|
+
#### `@mui/x-date-pickers@7.28.3`
|
|
38
|
+
|
|
39
|
+
Internal changes.
|
|
40
|
+
|
|
41
|
+
#### `@mui/x-date-pickers-pro@7.28.3` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
42
|
+
|
|
43
|
+
Same changes as in `@mui/x-date-pickers@7.28.3`.
|
|
44
|
+
|
|
45
|
+
### Docs
|
|
46
|
+
|
|
47
|
+
- [docs] Update Localization Provider JSDoc link (#17208) @LukasTy
|
|
48
|
+
- [docs] Use v6 core packages in MUI X v7 docs (#17171) @cherniavskii
|
|
49
|
+
|
|
50
|
+
## 7.28.2
|
|
51
|
+
|
|
52
|
+
_Mar 28, 2025_
|
|
53
|
+
|
|
54
|
+
We'd like to offer a big thanks to the 3 contributors who made this release possible. Here are some highlights ✨:
|
|
55
|
+
|
|
56
|
+
- 🐞 Bugfixes
|
|
57
|
+
|
|
58
|
+
Team members who have contributed to this release:
|
|
59
|
+
@flaviendelangle, @LukasTy, @arminmeh.
|
|
60
|
+
|
|
61
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
62
|
+
|
|
63
|
+
### Data Grid
|
|
64
|
+
|
|
65
|
+
#### `@mui/x-data-grid@7.28.2`
|
|
66
|
+
|
|
67
|
+
- [DataGrid] Fix error caused by trying to render rows that are not in the state anymore (#17117) @arminmeh
|
|
68
|
+
|
|
69
|
+
#### `@mui/x-data-grid-pro@7.28.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
70
|
+
|
|
71
|
+
Same changes as in `@mui/x-data-grid@7.28.2`.
|
|
72
|
+
|
|
73
|
+
#### `@mui/x-data-grid-premium@7.28.2` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
74
|
+
|
|
75
|
+
Same changes as in `@mui/x-data-grid-pro@7.28.2`.
|
|
76
|
+
|
|
77
|
+
### Date and Time Pickers
|
|
78
|
+
|
|
79
|
+
#### `@mui/x-date-pickers@7.28.2`
|
|
80
|
+
|
|
81
|
+
- [fields] Improve the check for year in `doesSectionFormatHaveLeadingZeros` (#17112) @flaviendelangle
|
|
82
|
+
|
|
83
|
+
#### `@mui/x-date-pickers-pro@7.28.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
84
|
+
|
|
85
|
+
Same changes as in `@mui/x-date-pickers@7.28.2`.
|
|
86
|
+
|
|
87
|
+
### Core
|
|
88
|
+
|
|
89
|
+
- [code-infra] Remove `test_regressions` step from React 18 pipeline (#17109) @LukasTy
|
|
90
|
+
|
|
91
|
+
## 7.28.1
|
|
92
|
+
|
|
93
|
+
_Mar 21, 2025_
|
|
94
|
+
|
|
95
|
+
We'd like to offer a big thanks to the 4 contributors who made this release possible. Here are some highlights ✨:
|
|
96
|
+
|
|
97
|
+
- 🐞 Bugfixes
|
|
98
|
+
|
|
99
|
+
Special thanks go out to the community contributors who have helped make this release possible:
|
|
100
|
+
@jyash97, @nusr.
|
|
101
|
+
|
|
102
|
+
Following are all team members who have contributed to this release:
|
|
103
|
+
@arminmeh, @KenanYusuf.
|
|
104
|
+
|
|
105
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
106
|
+
|
|
107
|
+
### Data Grid
|
|
108
|
+
|
|
109
|
+
#### `@mui/x-data-grid@7.28.1`
|
|
110
|
+
|
|
111
|
+
- [DataGrid] Fix error while editing rows with custom id (@arminmeh) (#17050)
|
|
112
|
+
|
|
113
|
+
#### `@mui/x-data-grid-pro@7.28.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
114
|
+
|
|
115
|
+
Same changes as in `@mui/x-data-grid@7.28.1`, plus:
|
|
116
|
+
|
|
117
|
+
- [DataGridPro] Fix header select checkbox state with `checkboxSelectionVisibleOnly` and `paginationMode="server"` (@arminmeh) (#17032)
|
|
118
|
+
|
|
119
|
+
#### `@mui/x-data-grid-premium@7.28.1` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
120
|
+
|
|
121
|
+
Same changes as in `@mui/x-data-grid-pro@7.28.1`, plus:
|
|
122
|
+
|
|
123
|
+
- [DataGridPremium] Update column state correctly when grouping mode is updated with one grouping column (@arminmeh) (#17074)
|
|
124
|
+
|
|
125
|
+
### Tree View
|
|
126
|
+
|
|
127
|
+
#### `@mui/x-tree-view@7.28.1`
|
|
128
|
+
|
|
129
|
+
Internal changes.
|
|
130
|
+
|
|
131
|
+
#### `@mui/x-tree-view-pro@7.28.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
132
|
+
|
|
133
|
+
Same changes as in `@mui/x-tree-view@7.28.1`, plus:
|
|
134
|
+
|
|
135
|
+
- [TreeView] Allow moving an item after the last children of some other item (@jyash97) (#17065)
|
|
136
|
+
|
|
137
|
+
### Docs
|
|
138
|
+
|
|
139
|
+
- [docs] Fix Data Grid advanced list view demo (#17066) @KenanYusuf
|
|
140
|
+
- [docs] Fix custom detail panel toggle state update (@nusr) (#17018)
|
|
141
|
+
|
|
6
142
|
## 7.28.0
|
|
7
143
|
|
|
8
144
|
_Mar 17, 2025_
|
|
@@ -17,7 +17,7 @@ export interface LocalizationProviderProps<TDate extends PickerValidDate, TLocal
|
|
|
17
17
|
children?: React.ReactNode;
|
|
18
18
|
/**
|
|
19
19
|
* Date library adapter class function.
|
|
20
|
-
* @see See the localization provider {@link https://mui.com/x/react-date-pickers/getting-started/#
|
|
20
|
+
* @see See the localization provider {@link https://mui.com/x/react-date-pickers/getting-started/#date-library-adapter-setup date adapter setup section} for more details.
|
|
21
21
|
*/
|
|
22
22
|
dateAdapter?: new (...args: any) => MuiPickersAdapter<TDate, TLocale>;
|
|
23
23
|
/** Formats that are used for any child pickers */
|
|
@@ -100,7 +100,7 @@ process.env.NODE_ENV !== "production" ? LocalizationProvider.propTypes = {
|
|
|
100
100
|
children: PropTypes.node,
|
|
101
101
|
/**
|
|
102
102
|
* Date library adapter class function.
|
|
103
|
-
* @see See the localization provider {@link https://mui.com/x/react-date-pickers/getting-started/#
|
|
103
|
+
* @see See the localization provider {@link https://mui.com/x/react-date-pickers/getting-started/#date-library-adapter-setup date adapter setup section} for more details.
|
|
104
104
|
*/
|
|
105
105
|
dateAdapter: PropTypes.func,
|
|
106
106
|
/**
|
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
|
{
|
|
@@ -100,7 +100,7 @@ process.env.NODE_ENV !== "production" ? LocalizationProvider.propTypes = {
|
|
|
100
100
|
children: PropTypes.node,
|
|
101
101
|
/**
|
|
102
102
|
* Date library adapter class function.
|
|
103
|
-
* @see See the localization provider {@link https://mui.com/x/react-date-pickers/getting-started/#
|
|
103
|
+
* @see See the localization provider {@link https://mui.com/x/react-date-pickers/getting-started/#date-library-adapter-setup date adapter setup section} for more details.
|
|
104
104
|
*/
|
|
105
105
|
dateAdapter: PropTypes.func,
|
|
106
106
|
/**
|
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
|
{
|
|
@@ -107,7 +107,7 @@ process.env.NODE_ENV !== "production" ? LocalizationProvider.propTypes = {
|
|
|
107
107
|
children: _propTypes.default.node,
|
|
108
108
|
/**
|
|
109
109
|
* Date library adapter class function.
|
|
110
|
-
* @see See the localization provider {@link https://mui.com/x/react-date-pickers/getting-started/#
|
|
110
|
+
* @see See the localization provider {@link https://mui.com/x/react-date-pickers/getting-started/#date-library-adapter-setup date adapter setup section} for more details.
|
|
111
111
|
*/
|
|
112
112
|
dateAdapter: _propTypes.default.func,
|
|
113
113
|
/**
|
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
|
{
|