@mui/x-date-pickers 7.27.3 β†’ 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 CHANGED
@@ -3,6 +3,184 @@
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` [![pro](https://mui.com/r/x-pro-svg)](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` [![premium](https://mui.com/r/x-premium-svg)](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` [![pro](https://mui.com/r/x-pro-svg)](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` [![pro](https://mui.com/r/x-pro-svg)](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` [![premium](https://mui.com/r/x-premium-svg)](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` [![pro](https://mui.com/r/x-pro-svg)](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
+
98
+ ## 7.28.0
99
+
100
+ _Mar 17, 2025_
101
+
102
+ We'd like to offer a big thanks to the 10 contributors who made this release possible. Here are some highlights ✨:
103
+
104
+ - 🎁 Add support for `@mui/material` version 7 in all X packages
105
+ - 🐞 Bugfixes
106
+ - 🌍 Improve Chinese (zh-CN), (zh-HK), (zh-TW), Czech (cs-CZ), Korean (ko-KR) and Slovak (sk-Sk) locales on the Data Grid
107
+ - 🌍 Improve Chinese (zh-CN), (zh-HK) and (zh-TW) locales on the Pickers
108
+
109
+ Special thanks go out to the community contributors who have helped make this release possible:
110
+ @Blake-McCullough, @hlavacz, @yelahj, @k-rajat19, @nusr.
111
+ Following are all team members who have contributed to this release:
112
+ @arminmeh, @flaviendelangle, @LukasTy, @michelengelen, @MBilalShafi.
113
+
114
+ <!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
115
+
116
+ ### Data Grid
117
+
118
+ #### `@mui/x-data-grid@7.28.0`
119
+
120
+ - [DataGrid] Add click propagation and prevents default on `toggleMenu` click (#16909) @michelengelen
121
+ - [DataGrid] Fix `processRowUpdate()` error if the row is removed before it is executed (#16904) @arminmeh
122
+ - [DataGrid] Fix bug with adding and removing columns in active edit state (#16916) @Blake-McCullough
123
+ - [DataGrid] Fix visual issue with pinned columns and row spanning (#16942) @MBilalShafi
124
+ - [DataGrid] Make column header menu button aria-labels unique (#16925) @owais635
125
+ - [DataGrid] Fix `printOptions` not respecting `hideFooter` root prop (#16915) @k-rajat19
126
+ - [l10n] Improve Chinese (zh-CN), (zh-HK) and (zh-TW) locales (#16917 and #16887) @nusr
127
+ - [l10n] Improve Czech (cs-CZ) and Slovak (sk-Sk) locales (#16996) @hlavacz
128
+ - [l10n] Improve Korean (ko-KR) locale (#16998) @yelahj
129
+
130
+ #### `@mui/x-data-grid-pro@7.28.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
131
+
132
+ Same changes as in `@mui/x-data-grid@7.28.0`, plus:
133
+
134
+ - [DataGridPro] Fix header filters not displaying restored values (#16976) @MBilalShafi
135
+ - [DataGridPro] Fix infinite loading not reacting when scrolling to the end (#16939) @arminmeh
136
+
137
+ #### `@mui/x-data-grid-premium@7.28.0` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
138
+
139
+ Same changes as in `@mui/x-data-grid-pro@7.28.0`, plus:
140
+
141
+ - [DataGridPremium] Fix selection propagation issues with controlled state (#16995) @MBilalShafi
142
+
143
+ ### Date and Time Pickers
144
+
145
+ #### `@mui/x-date-pickers@7.28.0`
146
+
147
+ - [l10n] Improve Chinese (zh-CN), (zh-HK) and (zh-TW) locales (#16997) @nusr
148
+
149
+ #### `@mui/x-date-pickers-pro@7.28.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
150
+
151
+ Same changes as in `@mui/x-date-pickers@7.28.0`, plus:
152
+
153
+ - [DateRangeCalendar] Do not update the previewed day when hovering a day and the value is empty (#16892) @flaviendelangle
154
+
155
+ ### Charts
156
+
157
+ #### `@mui/x-charts@7.28.0`
158
+
159
+ Internal changes.
160
+
161
+ #### `@mui/x-charts-pro@7.28.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
162
+
163
+ Same changes as in `@mui/x-charts@7.28.0`.
164
+
165
+ ### Tree View
166
+
167
+ #### `@mui/x-tree-view@7.28.0`
168
+
169
+ Internal changes.
170
+
171
+ #### `@mui/x-tree-view-pro@7.28.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
172
+
173
+ Same changes as in `@mui/x-tree-view@7.28.0`.
174
+
175
+ ### Docs
176
+
177
+ - [docs] Fix link to the lazy loading demo for the DataGrid (#16912) @nusr
178
+
179
+ ### Core
180
+
181
+ - [core] Allow `@mui/material` v7 in dependencies (#16951) @LukasTy
182
+ - [infra] Make tests on React 18 part of pipeline (#16958) @LukasTy
183
+
6
184
  ## 7.27.3
7
185
 
8
186
  _Mar 7, 2025_
package/README.md CHANGED
@@ -34,7 +34,7 @@ This component has the following peer dependencies that you will need to install
34
34
 
35
35
  ```json
36
36
  "peerDependencies": {
37
- "@mui/material": "^5.15.14 || ^6.0.0",
37
+ "@mui/material": "^5.15.14 || ^6.0.0 || ^7.0.0",
38
38
  "react": "^17.0.0 || ^18.0.0 || ^19.0.0",
39
39
  "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0"
40
40
  },
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-date-pickers v7.27.3
2
+ * @mui/x-date-pickers v7.28.2
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -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
- const currentSectionValue = parseInt(removeLocalizedDigits(section.value, localizedDigits), 10);
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
- if (isFourDigitYearFormat(utils, format)) {
248
- const formatted0001 = utils.formatByString(utils.setYear(now, 1), format);
249
- return formatted0001 === '0001';
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
- const formatted2001 = utils.formatByString(utils.setYear(now, 2001), format);
252
- return formatted2001 === '01';
253
+ return utils.formatByString(utils.setYear(now, 1), format).startsWith('0');
253
254
  }
254
255
  case 'month':
255
256
  {
@@ -14,7 +14,7 @@ interface FindClosestDateParams<TDate extends PickerValidDate> {
14
14
  export declare const findClosestEnabledDate: <TDate extends PickerValidDate>({ date, disableFuture, disablePast, maxDate, minDate, isDateDisabled, utils, timezone, }: FindClosestDateParams<TDate>) => TDate | null;
15
15
  export declare const replaceInvalidDateByNull: <TDate extends PickerValidDate>(utils: MuiPickersAdapter<TDate>, value: TDate | null) => TDate | null;
16
16
  export declare const applyDefaultDate: <TDate extends PickerValidDate>(utils: MuiPickersAdapter<TDate>, value: TDate | null | undefined, defaultValue: TDate) => TDate;
17
- export declare const areDatesEqual: <TDate extends PickerValidDate>(utils: MuiPickersAdapter<TDate>, a: TDate, b: TDate) => boolean;
17
+ export declare const areDatesEqual: <TDate extends PickerValidDate>(utils: MuiPickersAdapter<TDate>, a: TDate | null, b: TDate | null) => boolean;
18
18
  export declare const getMonthsInYear: <TDate extends PickerValidDate>(utils: MuiPickersAdapter<TDate>, year: TDate) => TDate[];
19
19
  export declare const getTodayDate: <TDate extends PickerValidDate>(utils: MuiPickersAdapter<TDate>, timezone: PickersTimezone, valueType?: FieldValueType) => TDate;
20
20
  export declare const formatMeridiem: <TDate extends PickerValidDate>(utils: MuiPickersAdapter<TDate>, meridiem: "am" | "pm") => string;
package/locales/zhCN.js CHANGED
@@ -29,7 +29,7 @@ const zhCNPickers = {
29
29
  datePickerToolbarTitle: '选择ζ—₯期',
30
30
  dateTimePickerToolbarTitle: '选择ζ—₯ζœŸε’Œζ—Άι—΄',
31
31
  timePickerToolbarTitle: '选择既间',
32
- dateRangePickerToolbarTitle: 'ι€‰ζ‹©ζ—Άι—΄θŒƒε›΄',
32
+ dateRangePickerToolbarTitle: '选择ζ—₯ζœŸθŒƒε›΄',
33
33
  // Clock labels
34
34
  clockLabelText: (view, time, utils, formattedTime) => `选择 ${views[view]}. ${!formattedTime && (time === null || !utils.isValid(time)) ? 'ζœͺ选择既间' : `已选择${formattedTime ?? utils.format(time, 'fullTime')}`}`,
35
35
  hoursClockNumberText: hours => `${hours}小既`,
package/locales/zhHK.js CHANGED
@@ -29,7 +29,7 @@ const zhHKPickers = {
29
29
  datePickerToolbarTitle: '選擇ζ—₯期',
30
30
  dateTimePickerToolbarTitle: '選擇ζ—₯ζœŸε’Œζ™‚ι–“',
31
31
  timePickerToolbarTitle: '選擇時間',
32
- dateRangePickerToolbarTitle: 'ιΈζ“‡ζ™‚ι–“η―„εœ',
32
+ dateRangePickerToolbarTitle: '選擇ζ—₯ζœŸη―„εœ',
33
33
  // Clock labels
34
34
  clockLabelText: (view, time, utils, formattedTime) => `選擇 ${views[view]}. ${!formattedTime && (time === null || !utils.isValid(time)) ? 'ζœͺ選擇時間' : `已選擇${formattedTime ?? utils.format(time, 'fullTime')}`}`,
35
35
  hoursClockNumberText: hours => `${hours}小時`,
package/locales/zhTW.js CHANGED
@@ -29,7 +29,7 @@ const zhTWPickers = {
29
29
  datePickerToolbarTitle: '選擇ζ—₯期',
30
30
  dateTimePickerToolbarTitle: '選擇ζ—₯ζœŸε’Œζ™‚ι–“',
31
31
  timePickerToolbarTitle: '選擇時間',
32
- dateRangePickerToolbarTitle: 'ιΈζ“‡ζ™‚ι–“η―„εœ',
32
+ dateRangePickerToolbarTitle: '選擇ζ—₯ζœŸη―„εœ',
33
33
  // Clock labels
34
34
  clockLabelText: (view, time, utils, formattedTime) => `選擇 ${views[view]}. ${!formattedTime && (time === null || !utils.isValid(time)) ? 'ζœͺ選擇時間' : `已選擇${formattedTime ?? utils.format(time, 'fullTime')}`}`,
35
35
  hoursClockNumberText: hours => `${hours}小時`,
package/modern/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-date-pickers v7.27.3
2
+ * @mui/x-date-pickers v7.28.2
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -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
- const currentSectionValue = parseInt(removeLocalizedDigits(section.value, localizedDigits), 10);
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
- if (isFourDigitYearFormat(utils, format)) {
248
- const formatted0001 = utils.formatByString(utils.setYear(now, 1), format);
249
- return formatted0001 === '0001';
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
- const formatted2001 = utils.formatByString(utils.setYear(now, 2001), format);
252
- return formatted2001 === '01';
253
+ return utils.formatByString(utils.setYear(now, 1), format).startsWith('0');
253
254
  }
254
255
  case 'month':
255
256
  {
@@ -29,7 +29,7 @@ const zhCNPickers = {
29
29
  datePickerToolbarTitle: '选择ζ—₯期',
30
30
  dateTimePickerToolbarTitle: '选择ζ—₯ζœŸε’Œζ—Άι—΄',
31
31
  timePickerToolbarTitle: '选择既间',
32
- dateRangePickerToolbarTitle: 'ι€‰ζ‹©ζ—Άι—΄θŒƒε›΄',
32
+ dateRangePickerToolbarTitle: '选择ζ—₯ζœŸθŒƒε›΄',
33
33
  // Clock labels
34
34
  clockLabelText: (view, time, utils, formattedTime) => `选择 ${views[view]}. ${!formattedTime && (time === null || !utils.isValid(time)) ? 'ζœͺ选择既间' : `已选择${formattedTime ?? utils.format(time, 'fullTime')}`}`,
35
35
  hoursClockNumberText: hours => `${hours}小既`,
@@ -29,7 +29,7 @@ const zhHKPickers = {
29
29
  datePickerToolbarTitle: '選擇ζ—₯期',
30
30
  dateTimePickerToolbarTitle: '選擇ζ—₯ζœŸε’Œζ™‚ι–“',
31
31
  timePickerToolbarTitle: '選擇時間',
32
- dateRangePickerToolbarTitle: 'ιΈζ“‡ζ™‚ι–“η―„εœ',
32
+ dateRangePickerToolbarTitle: '選擇ζ—₯ζœŸη―„εœ',
33
33
  // Clock labels
34
34
  clockLabelText: (view, time, utils, formattedTime) => `選擇 ${views[view]}. ${!formattedTime && (time === null || !utils.isValid(time)) ? 'ζœͺ選擇時間' : `已選擇${formattedTime ?? utils.format(time, 'fullTime')}`}`,
35
35
  hoursClockNumberText: hours => `${hours}小時`,
@@ -29,7 +29,7 @@ const zhTWPickers = {
29
29
  datePickerToolbarTitle: '選擇ζ—₯期',
30
30
  dateTimePickerToolbarTitle: '選擇ζ—₯ζœŸε’Œζ™‚ι–“',
31
31
  timePickerToolbarTitle: '選擇時間',
32
- dateRangePickerToolbarTitle: 'ιΈζ“‡ζ™‚ι–“η―„εœ',
32
+ dateRangePickerToolbarTitle: '選擇ζ—₯ζœŸη―„εœ',
33
33
  // Clock labels
34
34
  clockLabelText: (view, time, utils, formattedTime) => `選擇 ${views[view]}. ${!formattedTime && (time === null || !utils.isValid(time)) ? 'ζœͺ選擇時間' : `已選擇${formattedTime ?? utils.format(time, 'fullTime')}`}`,
35
35
  hoursClockNumberText: hours => `${hours}小時`,
package/node/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-date-pickers v7.27.3
2
+ * @mui/x-date-pickers v7.28.2
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -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
- const currentSectionValue = parseInt(removeLocalizedDigits(section.value, localizedDigits), 10);
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
- if (isFourDigitYearFormat(utils, format)) {
266
- const formatted0001 = utils.formatByString(utils.setYear(now, 1), format);
267
- return formatted0001 === '0001';
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
- const formatted2001 = utils.formatByString(utils.setYear(now, 2001), format);
270
- return formatted2001 === '01';
271
+ return utils.formatByString(utils.setYear(now, 1), format).startsWith('0');
271
272
  }
272
273
  case 'month':
273
274
  {
@@ -35,7 +35,7 @@ const zhCNPickers = {
35
35
  datePickerToolbarTitle: '选择ζ—₯期',
36
36
  dateTimePickerToolbarTitle: '选择ζ—₯ζœŸε’Œζ—Άι—΄',
37
37
  timePickerToolbarTitle: '选择既间',
38
- dateRangePickerToolbarTitle: 'ι€‰ζ‹©ζ—Άι—΄θŒƒε›΄',
38
+ dateRangePickerToolbarTitle: '选择ζ—₯ζœŸθŒƒε›΄',
39
39
  // Clock labels
40
40
  clockLabelText: (view, time, utils, formattedTime) => `选择 ${views[view]}. ${!formattedTime && (time === null || !utils.isValid(time)) ? 'ζœͺ选择既间' : `已选择${formattedTime ?? utils.format(time, 'fullTime')}`}`,
41
41
  hoursClockNumberText: hours => `${hours}小既`,
@@ -35,7 +35,7 @@ const zhHKPickers = {
35
35
  datePickerToolbarTitle: '選擇ζ—₯期',
36
36
  dateTimePickerToolbarTitle: '選擇ζ—₯ζœŸε’Œζ™‚ι–“',
37
37
  timePickerToolbarTitle: '選擇時間',
38
- dateRangePickerToolbarTitle: 'ιΈζ“‡ζ™‚ι–“η―„εœ',
38
+ dateRangePickerToolbarTitle: '選擇ζ—₯ζœŸη―„εœ',
39
39
  // Clock labels
40
40
  clockLabelText: (view, time, utils, formattedTime) => `選擇 ${views[view]}. ${!formattedTime && (time === null || !utils.isValid(time)) ? 'ζœͺ選擇時間' : `已選擇${formattedTime ?? utils.format(time, 'fullTime')}`}`,
41
41
  hoursClockNumberText: hours => `${hours}小時`,
@@ -35,7 +35,7 @@ const zhTWPickers = {
35
35
  datePickerToolbarTitle: '選擇ζ—₯期',
36
36
  dateTimePickerToolbarTitle: '選擇ζ—₯ζœŸε’Œζ™‚ι–“',
37
37
  timePickerToolbarTitle: '選擇時間',
38
- dateRangePickerToolbarTitle: 'ιΈζ“‡ζ™‚ι–“η―„εœ',
38
+ dateRangePickerToolbarTitle: '選擇ζ—₯ζœŸη―„εœ',
39
39
  // Clock labels
40
40
  clockLabelText: (view, time, utils, formattedTime) => `選擇 ${views[view]}. ${!formattedTime && (time === null || !utils.isValid(time)) ? 'ζœͺ選擇時間' : `已選擇${formattedTime ?? utils.format(time, 'fullTime')}`}`,
41
41
  hoursClockNumberText: hours => `${hours}小時`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/x-date-pickers",
3
- "version": "7.27.3",
3
+ "version": "7.28.2",
4
4
  "description": "The community edition of the Date and Time Picker components (MUI X).",
5
5
  "author": "MUI Team",
6
6
  "main": "./node/index.js",
@@ -36,18 +36,18 @@
36
36
  },
37
37
  "dependencies": {
38
38
  "@babel/runtime": "^7.25.7",
39
- "@mui/utils": "^5.16.6 || ^6.0.0",
39
+ "@mui/utils": "^5.16.6 || ^6.0.0 || ^7.0.0 || ^7.0.0-beta",
40
40
  "@types/react-transition-group": "^4.4.11",
41
41
  "clsx": "^2.1.1",
42
42
  "prop-types": "^15.8.1",
43
43
  "react-transition-group": "^4.4.5",
44
- "@mui/x-internals": "7.26.0"
44
+ "@mui/x-internals": "7.28.0"
45
45
  },
46
46
  "peerDependencies": {
47
47
  "@emotion/react": "^11.9.0",
48
48
  "@emotion/styled": "^11.8.1",
49
- "@mui/material": "^5.15.14 || ^6.0.0",
50
- "@mui/system": "^5.15.14 || ^6.0.0",
49
+ "@mui/material": "^5.15.14 || ^6.0.0 || ^7.0.0 || ^7.0.0-beta",
50
+ "@mui/system": "^5.15.14 || ^6.0.0 || ^7.0.0 || ^7.0.0-beta",
51
51
  "date-fns": "^2.25.0 || ^3.2.0 || ^4.0.0",
52
52
  "date-fns-jalali": "^2.13.0-0 || ^3.2.0-0 || ^4.0.0-0",
53
53
  "dayjs": "^1.10.7",