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
+
+const { orientation } = usePickersContext();
298
+
+console.log(orientation);
299
+
300
+
-console.log(props.isLandscape);
301
+
+const { orientation } = usePickersContext();
302
+
+console.log(orientation === 'landscape');
303
+
```
304
+
305
+
- The component passed to the `layout` slot no longer receives a `wrapperVariant` prop, instead you can use the `usePickersContext` hook:
306
+
307
+
```diff
308
+
-console.log(props.wrapperVariant);
309
+
+const { variant } = usePickersContext();
310
+
+console.log(variant);
311
+
```
312
+
313
+
### Slot: `toolbar`
314
+
315
+
- 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).
316
+
317
+
```diff
318
+
-console.log(props.isLandscape);
319
+
+const { orientation } = usePickersContext();
320
+
+console.log(orientation === 'landscape');
321
+
```
322
+
323
+
- The component passed to the `toolbar` slot no longer receives a `toolbarVariant` prop, instead you can use the `usePickersContext` hook:
324
+
325
+
```diff
326
+
-console.log(props.wrapperVariant);
327
+
+const { variant } = usePickersContext();
328
+
+console.log(variant);
329
+
```
330
+
331
+
- The component passed to the `toolbar` slot no longer receives a `disabled` prop, instead you can use the `usePickersContext` hook:
332
+
333
+
```diff
334
+
-console.log(props.disabled);
335
+
+const { disabled } = usePickersContext();
336
+
+console.log(disabled);
337
+
```
338
+
339
+
- The component passed to the `toolbar` slot no longer receives a `readOnly` prop, instead you can use the `usePickersContext` hook:
340
+
341
+
```diff
342
+
-console.log(props.readOnly);
343
+
+const { readOnly } = usePickersContext();
344
+
+console.log(readOnly);
345
+
```
346
+
347
+
## Typing breaking changes
348
+
349
+
### Removed types
263
350
264
351
The following types are no longer exported by `@mui/x-date-pickers` and/or `@mui/x-date-pickers-pro`.
265
352
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