You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- The component passed to the `layout` slot no longer receives a `isRtl` prop. If you need to access this information, you can use the `useRtl` hook from `@mui/system`:
282
+
283
+
```diff
284
+
+import { useRtl } from '@mui/system/RtlProvider';
285
+
286
+
function CustomLayout(props) {
287
+
- console.log(props.isRtl);
288
+
+ const isRtl = useRtl();
289
+
+ console.log(isRtl);
290
+
}
291
+
```
292
+
293
+
- The component passed to the `layout` slot no longer receives an `orientation` and the `isLandscape` props, instead you can use the `usePickersContext` hook:
294
+
295
+
```diff
296
+
-console.log(props.orientation);
297
+
+import { usePickersContext } from '@mui/x-date-pickers/hooks';
298
+
+const { orientation } = usePickersContext();
299
+
+console.log(orientation);
300
+
301
+
-console.log(props.isLandscape);
302
+
+import { usePickersContext } from '@mui/x-date-pickers/hooks';
303
+
+const { orientation } = usePickersContext();
304
+
+console.log(orientation === 'landscape');
305
+
```
306
+
307
+
- The component passed to the `layout` slot no longer receives a `wrapperVariant` prop, instead you can use the `usePickersContext` hook:
308
+
309
+
```diff
310
+
-console.log(props.wrapperVariant);
311
+
312
+
+import { usePickersContext } from '@mui/x-date-pickers/hooks';
313
+
+const { variant } = usePickersContext();
314
+
+console.log(variant);
315
+
```
316
+
317
+
- The component passed to the `layout` slot no longer receives a `disabled` prop, instead you can use the `usePickersContext` hook:
318
+
319
+
```diff
320
+
-console.log(props.disabled);
321
+
322
+
+import { usePickersContext } from '@mui/x-date-pickers/hooks';
323
+
+const { disabled } = usePickersContext();
324
+
+console.log(disabled);
325
+
```
326
+
327
+
- The component passed to the `layout` slot no longer receives a `readOnly` prop, instead you can use the `usePickersContext` hook:
328
+
329
+
```diff
330
+
-console.log(props.readOnly);
331
+
332
+
+import { usePickersContext } from '@mui/x-date-pickers/hooks';
333
+
+const { readOnly } = usePickersContext();
334
+
+console.log(readOnly);
335
+
```
336
+
337
+
### Slot: `toolbar`
338
+
339
+
- The component passed to the `toolbar` slot no longer receives a `isLandscape` prop. There is currently no way to access this information, if you need it, please [open an issue](https://github.com/mui/mui-x/issues/new/choose).
340
+
341
+
```diff
342
+
-console.log(props.isLandscape);
343
+
344
+
+import { usePickersContext } from '@mui/x-date-pickers/hooks';
345
+
+const { orientation } = usePickersContext();
346
+
+console.log(orientation === 'landscape');
347
+
```
348
+
349
+
- The component passed to the `toolbar` slot no longer receives a `toolbarVariant` prop, instead you can use the `usePickersContext` hook:
350
+
351
+
```diff
352
+
-console.log(props.wrapperVariant);
353
+
354
+
+import { usePickersContext } from '@mui/x-date-pickers/hooks';
355
+
+const { variant } = usePickersContext();
356
+
+console.log(variant);
357
+
```
358
+
359
+
- The component passed to the `toolbar` slot no longer receives a `disabled` prop, instead you can use the `usePickersContext` hook:
360
+
361
+
```diff
362
+
-console.log(props.disabled);
363
+
364
+
+import { usePickersContext } from '@mui/x-date-pickers/hooks';
365
+
+const { disabled } = usePickersContext();
366
+
+console.log(disabled);
367
+
```
368
+
369
+
- The component passed to the `toolbar` slot no longer receives a `readOnly` prop, instead you can use the `usePickersContext` hook:
370
+
371
+
```diff
372
+
-console.log(props.readOnly);
373
+
374
+
+import { usePickersContext } from '@mui/x-date-pickers/hooks';
375
+
+const { readOnly } = usePickersContext();
376
+
+console.log(readOnly);
377
+
```
378
+
379
+
## Typing breaking changes
380
+
381
+
### Removed types
263
382
264
383
The following types are no longer exported by `@mui/x-date-pickers` and/or `@mui/x-date-pickers-pro`.
265
384
If you were using them, you need to replace them with the following code:
Copy file name to clipboardexpand all lines: docs/translations/api-docs/date-pickers/desktop-date-time-range-picker/desktop-date-time-range-picker.json
+1
Original file line number
Diff line number
Diff line change
@@ -137,6 +137,7 @@
137
137
"rangePosition": {
138
138
"description": "The position in the currently edited date range. Used when the component position is controlled."
0 commit comments