@mui/x-data-grid 7.0.0-alpha.0 → 7.0.0-alpha.1
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 +409 -1
- package/components/toolbar/GridToolbarFilterButton.js +3 -1
- package/index.js +1 -1
- package/legacy/components/toolbar/GridToolbarFilterButton.js +3 -1
- package/legacy/index.js +1 -1
- package/modern/components/toolbar/GridToolbarFilterButton.js +3 -1
- package/modern/index.js +1 -1
- package/node/components/toolbar/GridToolbarFilterButton.js +3 -1
- package/node/index.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,413 @@
|
|
|
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.0.0-alpha.1
|
|
7
|
+
|
|
8
|
+
_Nov 17, 2023_
|
|
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
|
+
- 📚 Documentation improvements
|
|
14
|
+
|
|
15
|
+
### Date Pickers
|
|
16
|
+
|
|
17
|
+
#### `@mui/x-date-pickers@7.0.0-alpha.1` / `@mui/x-date-pickers-pro@7.0.0-alpha.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
18
|
+
|
|
19
|
+
#### Breaking changes
|
|
20
|
+
|
|
21
|
+
- The string argument of the `dayOfWeekFormatter` prop has been replaced in favor of the date object to allow more flexibility.
|
|
22
|
+
|
|
23
|
+
```diff
|
|
24
|
+
<DateCalendar
|
|
25
|
+
// If you were still using the day string, you can get it back with your date library.
|
|
26
|
+
- dayOfWeekFormatter={dayStr => `${dayStr}.`}
|
|
27
|
+
+ dayOfWeekFormatter={day => `${day.format('dd')}.`}
|
|
28
|
+
|
|
29
|
+
// If you were already using the day object, just remove the first argument.
|
|
30
|
+
- dayOfWeekFormatter={(_dayStr, day) => `${day.format('dd')}.`}
|
|
31
|
+
+ dayOfWeekFormatter={day => `${day.format('dd')}.`}
|
|
32
|
+
/>
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
- The imports related to the `calendarHeader` slot have been moved from `@mui/x-date-pickers/DateCalendar` to `@mui/x-date-pickers/PIckersCalendarHeader`:
|
|
36
|
+
|
|
37
|
+
```diff
|
|
38
|
+
export {
|
|
39
|
+
pickersCalendarHeaderClasses,
|
|
40
|
+
PickersCalendarHeaderClassKey,
|
|
41
|
+
PickersCalendarHeaderClasses,
|
|
42
|
+
PickersCalendarHeader,
|
|
43
|
+
PickersCalendarHeaderProps,
|
|
44
|
+
PickersCalendarHeaderSlotsComponent,
|
|
45
|
+
PickersCalendarHeaderSlotsComponentsProps,
|
|
46
|
+
ExportedPickersCalendarHeaderProps,
|
|
47
|
+
- } from '@mui/x-date-pickers/DateCalendar';
|
|
48
|
+
+ } from '@mui/x-date-pickers/PickersCalendarHeader';
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
- The `monthAndYear` format has been removed.
|
|
53
|
+
It was used in the header of the calendar views, you can replace it with the new `format` prop of the `calendarHeader` slot:
|
|
54
|
+
|
|
55
|
+
```diff
|
|
56
|
+
<LocalizationProvider
|
|
57
|
+
adapter={AdapterDayJS}
|
|
58
|
+
- formats={{ monthAndYear: 'MM/YYYY' }}
|
|
59
|
+
/>
|
|
60
|
+
<DatePicker
|
|
61
|
+
+ slotProps={{ calendarHeader: { format: 'MM/YYYY' }}}
|
|
62
|
+
/>
|
|
63
|
+
<DateRangePicker
|
|
64
|
+
+ slotProps={{ calendarHeader: { format: 'MM/YYYY' }}}
|
|
65
|
+
/>
|
|
66
|
+
<LocalizationProvider />
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
- The `adapter.getDiff` method have been removed, you can directly use your date library:
|
|
70
|
+
|
|
71
|
+
```diff
|
|
72
|
+
// For Day.js
|
|
73
|
+
- const diff = adapter.getDiff(value, comparing, unit);
|
|
74
|
+
+ const diff = value.diff(comparing, unit);
|
|
75
|
+
|
|
76
|
+
// For Luxon
|
|
77
|
+
- const diff = adapter.getDiff(value, comparing, unit);
|
|
78
|
+
+ const getDiff = (value: DateTime, comparing: DateTime | string, unit?: AdapterUnits) => {
|
|
79
|
+
+ const parsedComparing = typeof comparing === 'string'
|
|
80
|
+
+ ? DateTime.fromJSDate(new Date(comparing))
|
|
81
|
+
+ : comparing;
|
|
82
|
+
+ if (unit) {
|
|
83
|
+
+ return Math.floor(value.diff(comparing).as(unit));
|
|
84
|
+
+ }
|
|
85
|
+
+ return value.diff(comparing).as('millisecond');
|
|
86
|
+
+ };
|
|
87
|
+
+
|
|
88
|
+
+ const diff = getDiff(value, comparing, unit);
|
|
89
|
+
|
|
90
|
+
// For DateFns
|
|
91
|
+
- const diff = adapter.getDiff(value, comparing, unit);
|
|
92
|
+
+ const getDiff = (value: Date, comparing: Date | string, unit?: AdapterUnits) => {
|
|
93
|
+
+ const parsedComparing = typeof comparing === 'string' ? new Date(comparing) : comparing;
|
|
94
|
+
+ switch (unit) {
|
|
95
|
+
+ case 'years':
|
|
96
|
+
+ return dateFns.differenceInYears(value, parsedComparing);
|
|
97
|
+
+ case 'quarters':
|
|
98
|
+
+ return dateFns.differenceInQuarters(value, parsedComparing);
|
|
99
|
+
+ case 'months':
|
|
100
|
+
+ return dateFns.differenceInMonths(value, parsedComparing);
|
|
101
|
+
+ case 'weeks':
|
|
102
|
+
+ return dateFns.differenceInWeeks(value, parsedComparing);
|
|
103
|
+
+ case 'days':
|
|
104
|
+
+ return dateFns.differenceInDays(value, parsedComparing);
|
|
105
|
+
+ case 'hours':
|
|
106
|
+
+ return dateFns.differenceInHours(value, parsedComparing);
|
|
107
|
+
+ case 'minutes':
|
|
108
|
+
+ return dateFns.differenceInMinutes(value, parsedComparing);
|
|
109
|
+
+ case 'seconds':
|
|
110
|
+
+ return dateFns.differenceInSeconds(value, parsedComparing);
|
|
111
|
+
+ default: {
|
|
112
|
+
+ return dateFns.differenceInMilliseconds(value, parsedComparing);
|
|
113
|
+
+ }
|
|
114
|
+
+ }
|
|
115
|
+
+ };
|
|
116
|
+
+
|
|
117
|
+
+ const diff = getDiff(value, comparing, unit);
|
|
118
|
+
|
|
119
|
+
// For Moment
|
|
120
|
+
- const diff = adapter.getDiff(value, comparing, unit);
|
|
121
|
+
+ const diff = value.diff(comparing, unit);
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
- The `adapter.getFormatHelperText` method have been removed, you can use the `adapter.expandFormat` instead:
|
|
125
|
+
|
|
126
|
+
```diff
|
|
127
|
+
- const expandedFormat = adapter.getFormatHelperText(format);
|
|
128
|
+
+ const expandedFormat = adapter.expandFormat(format);
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
And if you need the exact same output you can apply the following transformation:
|
|
132
|
+
|
|
133
|
+
```diff
|
|
134
|
+
// For Day.js
|
|
135
|
+
- const expandedFormat = adapter.getFormatHelperText(format);
|
|
136
|
+
+ const expandedFormat = adapter.expandFormat(format).replace(/a/gi, '(a|p)m').toLocaleLowerCase();
|
|
137
|
+
|
|
138
|
+
// For Luxon
|
|
139
|
+
- const expandedFormat = adapter.getFormatHelperText(format);
|
|
140
|
+
+ const expandedFormat = adapter.expandFormat(format).replace(/(a)/g, '(a|p)m').toLocaleLowerCase();
|
|
141
|
+
|
|
142
|
+
// For DateFns
|
|
143
|
+
- const expandedFormat = adapter.getFormatHelperText(format);
|
|
144
|
+
+ const expandedFormat = adapter.expandFormat(format).replace(/(aaa|aa|a)/g, '(a|p)m').toLocaleLowerCase();
|
|
145
|
+
|
|
146
|
+
// For Moment
|
|
147
|
+
- const expandedFormat = adapter.getFormatHelperText(format);
|
|
148
|
+
+ const expandedFormat = adapter.expandFormat(format).replace(/a/gi, '(a|p)m').toLocaleLowerCase();
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
- The `adapter.getMeridiemText` method have been removed, you can use the `adapter.setHours`, `adapter.date` and `adapter.format` methods to recreate its behavior:
|
|
152
|
+
|
|
153
|
+
```diff
|
|
154
|
+
- const meridiem = adapter.getMeridiemText('am');
|
|
155
|
+
+ const getMeridiemText = (meridiem: 'am' | 'pm') => {
|
|
156
|
+
+ const date = adapter.setHours(adapter.date()!, meridiem === 'am' ? 2 : 14);
|
|
157
|
+
+ return utils.format(date, 'meridiem');
|
|
158
|
+
+ };
|
|
159
|
+
+
|
|
160
|
+
+ const meridiem = getMeridiemText('am');
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
- The `adapter.getMonthArray` method have been removed, you can use the `adapter.startOfYear` and `adapter.addMonths` methods to recreate its behavior:
|
|
164
|
+
|
|
165
|
+
```diff
|
|
166
|
+
- const monthArray = adapter.getMonthArray(value);
|
|
167
|
+
+ const getMonthArray = (year) => {
|
|
168
|
+
+ const firstMonth = utils.startOfYear(year);
|
|
169
|
+
+ const months = [firstMonth];
|
|
170
|
+
+
|
|
171
|
+
+ while (months.length < 12) {
|
|
172
|
+
+ const prevMonth = months[months.length - 1];
|
|
173
|
+
+ months.push(utils.addMonths(prevMonth, 1));
|
|
174
|
+
+ }
|
|
175
|
+
+
|
|
176
|
+
+ return months;
|
|
177
|
+
+ }
|
|
178
|
+
+
|
|
179
|
+
+ const monthArray = getMonthArray(value);
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
- The `adapter.getNextMonth` method have been removed, you can use the `adapter.addMonths` method instead:
|
|
183
|
+
|
|
184
|
+
```diff
|
|
185
|
+
- const nextMonth = adapter.getNextMonth(value);
|
|
186
|
+
+ const nextMonth = adapter.addMonths(value, 1);
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
- The `adapter.getPreviousMonth` method have been removed, you can use the `adapter.addMonths` method instead:
|
|
190
|
+
|
|
191
|
+
```diff
|
|
192
|
+
- const previousMonth = adapter.getPreviousMonth(value);
|
|
193
|
+
+ const previousMonth = adapter.addMonths(value, -1);
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
- The `adapter.getWeekdays` method have been removed, you can use the `adapter.startOfWeek` and `adapter.addDays` methods instead:
|
|
197
|
+
|
|
198
|
+
```diff
|
|
199
|
+
- const weekDays = adapter.getWeekdays(value);
|
|
200
|
+
+ const getWeekdays = (value) => {
|
|
201
|
+
+ const start = adapter.startOfWeek(value);
|
|
202
|
+
+ return [0, 1, 2, 3, 4, 5, 6].map((diff) => utils.addDays(start, diff));
|
|
203
|
+
+ };
|
|
204
|
+
+
|
|
205
|
+
+ const weekDays = getWeekdays(value);
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
- The `isNull` method have been removed, you can replace it with a very basic check:
|
|
209
|
+
|
|
210
|
+
```diff
|
|
211
|
+
- const isNull = adapter.isNull(value);
|
|
212
|
+
+ const isNull = value === null;
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
- The `adapter.mergeDateAndTime` method have been removed, you can use the `adapter.setHours`, `adapter.setMinutes`, and `adapter.setSeconds` methods to recreate its behavior:
|
|
216
|
+
|
|
217
|
+
```diff
|
|
218
|
+
- const result = adapter.mergeDateAndTime(valueWithDate, valueWithTime);
|
|
219
|
+
+ const mergeDateAndTime = <TDate>(
|
|
220
|
+
+ dateParam,
|
|
221
|
+
+ timeParam,
|
|
222
|
+
+ ) => {
|
|
223
|
+
+ let mergedDate = dateParam;
|
|
224
|
+
+ mergedDate = utils.setHours(mergedDate, utils.getHours(timeParam));
|
|
225
|
+
+ mergedDate = utils.setMinutes(mergedDate, utils.getMinutes(timeParam));
|
|
226
|
+
+ mergedDate = utils.setSeconds(mergedDate, utils.getSeconds(timeParam));
|
|
227
|
+
+
|
|
228
|
+
+ return mergedDate;
|
|
229
|
+
+ };
|
|
230
|
+
+
|
|
231
|
+
+ const result = mergeDateAndTime(valueWithDate, valueWithTime);
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
- The `adapter.parseISO` method have been removed, you can directly use your date library:
|
|
235
|
+
|
|
236
|
+
```diff
|
|
237
|
+
// For Day.js
|
|
238
|
+
- const value = adapter.parseISO(isoString);
|
|
239
|
+
+ const value = dayjs(isoString);
|
|
240
|
+
|
|
241
|
+
// For Luxon
|
|
242
|
+
- const value = adapter.parseISO(isoString);
|
|
243
|
+
+ const value = DateTime.fromISO(isoString);
|
|
244
|
+
|
|
245
|
+
// For DateFns
|
|
246
|
+
- const value = adapter.parseISO(isoString);
|
|
247
|
+
+ const value = dateFns.parseISO(isoString);
|
|
248
|
+
|
|
249
|
+
// For Moment
|
|
250
|
+
- const value = adapter.parseISO(isoString);
|
|
251
|
+
+ const value = moment(isoString, true);
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
- The `adapter.toISO` method have been removed, you can directly use your date library:
|
|
255
|
+
|
|
256
|
+
```diff
|
|
257
|
+
- const isoString = adapter.toISO(value);
|
|
258
|
+
+ const isoString = value.toISOString();
|
|
259
|
+
+ const isoString = value.toUTC().toISO({ format: 'extended' });
|
|
260
|
+
+ const isoString = dateFns.formatISO(value, { format: 'extended' });
|
|
261
|
+
+ const isoString = value.toISOString();
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
- The `adapter.isEqual` method used to accept any type of value for its two input and tried to parse them before checking if they were equal.
|
|
265
|
+
The method has been simplified and now only accepts an already-parsed date or `null` (ie: the same formats used by the `value` prop in the pickers)
|
|
266
|
+
|
|
267
|
+
```diff
|
|
268
|
+
const adapterDayjs = new AdapterDayjs();
|
|
269
|
+
const adapterLuxon = new AdapterLuxon();
|
|
270
|
+
const adapterDateFns = new AdapterDateFns();
|
|
271
|
+
const adapterMoment = new AdatperMoment();
|
|
272
|
+
|
|
273
|
+
// Supported formats
|
|
274
|
+
const isEqual = adapterDayjs.isEqual(null, null); // Same for the other adapters
|
|
275
|
+
const isEqual = adapterLuxon.isEqual(DateTime.now(), DateTime.fromISO('2022-04-17'));
|
|
276
|
+
const isEqual = adapterMoment.isEqual(moment(), moment('2022-04-17'));
|
|
277
|
+
const isEqual = adapterDateFns.isEqual(new Date(), new Date('2022-04-17'));
|
|
278
|
+
|
|
279
|
+
// Non-supported formats (JS Date)
|
|
280
|
+
- const isEqual = adapterDayjs.isEqual(new Date(), new Date('2022-04-17'));
|
|
281
|
+
+ const isEqual = adapterDayjs.isEqual(dayjs(), dayjs('2022-04-17'));
|
|
282
|
+
|
|
283
|
+
- const isEqual = adapterLuxon.isEqual(new Date(), new Date('2022-04-17'));
|
|
284
|
+
+ const isEqual = adapterLuxon.isEqual(DateTime.now(), DateTime.fromISO('2022-04-17'));
|
|
285
|
+
|
|
286
|
+
- const isEqual = adapterMoment.isEqual(new Date(), new Date('2022-04-17'));
|
|
287
|
+
+ const isEqual = adapterMoment.isEqual(moment(), moment('2022-04-17'));
|
|
288
|
+
|
|
289
|
+
// Non-supported formats (string)
|
|
290
|
+
- const isEqual = adapterDayjs.isEqual('2022-04-16', '2022-04-17');
|
|
291
|
+
+ const isEqual = adapterDayjs.isEqual(dayjs('2022-04-17'), dayjs('2022-04-17'));
|
|
292
|
+
|
|
293
|
+
- const isEqual = adapterLuxon.isEqual('2022-04-16', '2022-04-17');
|
|
294
|
+
+ const isEqual = adapterLuxon.isEqual(DateTime.fromISO('2022-04-17'), DateTime.fromISO('2022-04-17'));
|
|
295
|
+
|
|
296
|
+
- const isEqual = adapterMoment.isEqual('2022-04-16', '2022-04-17');
|
|
297
|
+
+ const isEqual = adapterMoment.isEqual(moment('2022-04-17'), moment('2022-04-17'));
|
|
298
|
+
|
|
299
|
+
- const isEqual = adapterDateFns.isEqual('2022-04-16', '2022-04-17');
|
|
300
|
+
+ const isEqual = adapterDateFns.isEqual(new Date('2022-04-17'), new Date('2022-04-17'));
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
- The `dateLibInstance` prop of `LocalizationProvider` does not work with `AdapterDayjs` anymore (#11023). This prop was used to set the pickers in UTC mode before the implementation of a proper timezone support in the components.
|
|
304
|
+
You can learn more about the new approach on the [dedicated doc page](https://mui.com/x/react-date-pickers/timezone/).
|
|
305
|
+
|
|
306
|
+
```diff
|
|
307
|
+
// When a `value` or a `defaultValue` is provided
|
|
308
|
+
<LocalizationProvider
|
|
309
|
+
adapter={AdapterDayjs}
|
|
310
|
+
- dateLibInstance={dayjs.utc}
|
|
311
|
+
>
|
|
312
|
+
<DatePicker value={dayjs.utc('2022-04-17')} />
|
|
313
|
+
</LocalizationProvider>
|
|
314
|
+
|
|
315
|
+
// When no `value` or `defaultValue` is provided
|
|
316
|
+
<LocalizationProvider
|
|
317
|
+
adapter={AdapterDayjs}
|
|
318
|
+
- dateLibInstance={dayjs.utc}
|
|
319
|
+
>
|
|
320
|
+
- <DatePicker />
|
|
321
|
+
+ <DatePicker timezone="UTC" />
|
|
322
|
+
</LocalizationProvider>
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
- The property `hasLeadingZeros` has been removed from the sections in favor of the more precise `hasLeadingZerosInFormat` and `hasLeadingZerosInInput` properties (#10994). To keep the same behavior, you can replace it by `hasLeadingZerosInFormat`:
|
|
326
|
+
|
|
327
|
+
```diff
|
|
328
|
+
const fieldRef = React.useRef<FieldRef<FieldSection>>(null);
|
|
329
|
+
|
|
330
|
+
React.useEffect(() => {
|
|
331
|
+
const firstSection = fieldRef.current!.getSections()[0]
|
|
332
|
+
- console.log(firstSection.hasLeadingZeros)
|
|
333
|
+
+ console.log(firstSection.hasLeadingZerosInFormat)
|
|
334
|
+
}, [])
|
|
335
|
+
|
|
336
|
+
return (
|
|
337
|
+
<DateField unstableFieldRef={fieldRef} />
|
|
338
|
+
);
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
- The `adapter.getYearRange` method used to accept two params and now accepts a tuple to be consistent with the `adapter.isWithinRange` method (#10978):
|
|
342
|
+
|
|
343
|
+
```diff
|
|
344
|
+
- adapter.getYearRange(start, end);
|
|
345
|
+
+ adapter.getYearRange([start, end])
|
|
346
|
+
```
|
|
347
|
+
|
|
348
|
+
- The `adapter.isValid` method used to accept any type of value and tried to parse them before checking their validity (#10971).
|
|
349
|
+
The method has been simplified and now only accepts an already-parsed date or `null`.
|
|
350
|
+
Which is the same type as the one accepted by the components `value` prop.
|
|
351
|
+
|
|
352
|
+
```diff
|
|
353
|
+
const adapterDayjs = new AdapterDayjs();
|
|
354
|
+
const adapterLuxon = new AdapterLuxon();
|
|
355
|
+
const adapterDateFns = new AdapterDateFns();
|
|
356
|
+
const adapterMoment = new AdatperMoment();
|
|
357
|
+
|
|
358
|
+
// Supported formats
|
|
359
|
+
const isValid = adapterDayjs.isValid(null); // Same for the other adapters
|
|
360
|
+
const isValid = adapterLuxon.isValid(DateTime.now());
|
|
361
|
+
const isValid = adapterMoment.isValid(moment());
|
|
362
|
+
const isValid = adapterDateFns.isValid(new Date());
|
|
363
|
+
|
|
364
|
+
// Non-supported formats (JS Date)
|
|
365
|
+
- const isValid = adapterDayjs.isValid(new Date('2022-04-17'));
|
|
366
|
+
+ const isValid = adapterDayjs.isValid(dayjs('2022-04-17'));
|
|
367
|
+
|
|
368
|
+
- const isValid = adapterLuxon.isValid(new Date('2022-04-17'));
|
|
369
|
+
+ const isValid = adapterLuxon.isValid(DateTime.fromISO('2022-04-17'));
|
|
370
|
+
|
|
371
|
+
- const isValid = adapterMoment.isValid(new Date('2022-04-17'));
|
|
372
|
+
+ const isValid = adapterMoment.isValid(moment('2022-04-17'));
|
|
373
|
+
|
|
374
|
+
// Non-supported formats (string)
|
|
375
|
+
- const isValid = adapterDayjs.isValid('2022-04-17');
|
|
376
|
+
+ const isValid = adapterDayjs.isValid(dayjs('2022-04-17'));
|
|
377
|
+
|
|
378
|
+
- const isValid = adapterLuxon.isValid('2022-04-17');
|
|
379
|
+
+ const isValid = adapterLuxon.isValid(DateTime.fromISO('2022-04-17'));
|
|
380
|
+
|
|
381
|
+
- const isValid = adapterMoment.isValid('2022-04-17');
|
|
382
|
+
+ const isValid = adapterMoment.isValid(moment('2022-04-17'));
|
|
383
|
+
|
|
384
|
+
- const isValid = adapterDateFns.isValid('2022-04-17');
|
|
385
|
+
+ const isValid = adapterDateFns.isValid(new Date('2022-04-17'));
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
#### Changes
|
|
389
|
+
|
|
390
|
+
- [pickers] Change the input format of `adapter.getYearRange` to be consistent with `adapter.isWithinRange` (#10978) @flaviendelangle
|
|
391
|
+
- [pickers] Clean remaining `components` / `componentsProps` typings (#11040) @flaviendelangle
|
|
392
|
+
- [pickers] Modify `adapter.isEqual` method to accept `TDate | null` instead of `any` (#10976) @flaviendelangle
|
|
393
|
+
- [pickers] Modify `adapter.isValid` method to accept `TDate | null` instead of `any` (#10971) @flaviendelangle
|
|
394
|
+
- [pickers] Remove the `hasLeadingZeros` property from `FieldSection` (#10994) @flaviendelangle
|
|
395
|
+
- [pickers] Remove the deprecated methods and formats from the adapters (#10776) @flaviendelangle
|
|
396
|
+
- [pickers] Remove the legacy UTC implementation for `dayjs` (#11023) @flaviendelangle
|
|
397
|
+
- [pickers] Remove unused code (#11048) @flaviendelangle
|
|
398
|
+
- [pickers] Move the exports of the `calendarHeader` slot to `@mui/x-date-pickers/PickersCalendarHeader` (#11020) @flaviendelangle
|
|
399
|
+
- [DateCalendar] Allow to override the format of the header with a prop (#10990) @flaviendelangle
|
|
400
|
+
- [DateCalendar] Remove the string argument of the `dayOfWeekFormatter` prop (#10992) @flaviendelangle
|
|
401
|
+
|
|
402
|
+
### Docs
|
|
403
|
+
|
|
404
|
+
- [docs] Fix incorrect component name in the "Custom slots and subcomponents" page (#11024) @flaviendelangle
|
|
405
|
+
- [docs] Fix typos in pickers migration guide (#11057) @flaviendelangle
|
|
406
|
+
|
|
407
|
+
### Core
|
|
408
|
+
|
|
409
|
+
- [core] Clean the component slots doc generation (#11021) @flaviendelangle
|
|
410
|
+
- [core] Fix script to release with `next` tag (#10996) @LukasTy
|
|
411
|
+
- [test] Wait for images to load (#11004) @cherniavskii
|
|
412
|
+
|
|
6
413
|
## 7.0.0-alpha.0
|
|
7
414
|
|
|
8
415
|
_Nov 10, 2023_
|
|
@@ -384,7 +791,7 @@ Same changes as in `@mui/x-date-pickers@6.16.3`, plus:
|
|
|
384
791
|
|
|
385
792
|
- [charts] Add reference links to area + bar chart components (#10652) @michelengelen
|
|
386
793
|
- [charts] Add reference links to line chart + sparkline components (#10650) @michelengelen
|
|
387
|
-
- [charts] Add reference links to pie + scatter chart components
|
|
794
|
+
- [charts] Add reference links to pie + scatter chart components (#10653) @michelengelen
|
|
388
795
|
- [charts] Render only when `width` and `height` are resolved (#10714) @alexfauquette
|
|
389
796
|
- [charts] Support animation on `BarChart` (#9926) @alexfauquette
|
|
390
797
|
- [charts] Use new text component to avoid tick label overflow on x-axis (#10648) @alexfauquette
|
|
@@ -460,6 +867,7 @@ It adds line break support and avoids overlapping text in the legend.
|
|
|
460
867
|
This comes with some breaking changes.
|
|
461
868
|
|
|
462
869
|
- The DOM structure is modified. An intermediary `<tspan />` element has been added. This can impact how your style is applied.
|
|
870
|
+
|
|
463
871
|
```diff
|
|
464
872
|
- <text>The label</text>
|
|
465
873
|
+ <text><tspan>The label</tspan></text>
|
|
@@ -130,6 +130,8 @@ process.env.NODE_ENV !== "production" ? GridToolbarFilterButton.propTypes = {
|
|
|
130
130
|
* The props used for each slot inside.
|
|
131
131
|
* @default {}
|
|
132
132
|
*/
|
|
133
|
-
componentsProps: PropTypes.
|
|
133
|
+
componentsProps: PropTypes.shape({
|
|
134
|
+
button: PropTypes.object
|
|
135
|
+
})
|
|
134
136
|
} : void 0;
|
|
135
137
|
export { GridToolbarFilterButton };
|
package/index.js
CHANGED
|
@@ -133,6 +133,8 @@ process.env.NODE_ENV !== "production" ? GridToolbarFilterButton.propTypes = {
|
|
|
133
133
|
* The props used for each slot inside.
|
|
134
134
|
* @default {}
|
|
135
135
|
*/
|
|
136
|
-
componentsProps: PropTypes.
|
|
136
|
+
componentsProps: PropTypes.shape({
|
|
137
|
+
button: PropTypes.object
|
|
138
|
+
})
|
|
137
139
|
} : void 0;
|
|
138
140
|
export { GridToolbarFilterButton };
|
package/legacy/index.js
CHANGED
|
@@ -128,6 +128,8 @@ process.env.NODE_ENV !== "production" ? GridToolbarFilterButton.propTypes = {
|
|
|
128
128
|
* The props used for each slot inside.
|
|
129
129
|
* @default {}
|
|
130
130
|
*/
|
|
131
|
-
componentsProps: PropTypes.
|
|
131
|
+
componentsProps: PropTypes.shape({
|
|
132
|
+
button: PropTypes.object
|
|
133
|
+
})
|
|
132
134
|
} : void 0;
|
|
133
135
|
export { GridToolbarFilterButton };
|
package/modern/index.js
CHANGED
|
@@ -136,5 +136,7 @@ process.env.NODE_ENV !== "production" ? GridToolbarFilterButton.propTypes = {
|
|
|
136
136
|
* The props used for each slot inside.
|
|
137
137
|
* @default {}
|
|
138
138
|
*/
|
|
139
|
-
componentsProps: _propTypes.default.
|
|
139
|
+
componentsProps: _propTypes.default.shape({
|
|
140
|
+
button: _propTypes.default.object
|
|
141
|
+
})
|
|
140
142
|
} : void 0;
|
package/node/index.js
CHANGED