Skip to content

Commit 9fbc4d5

Browse files
authored
Merge branch 'mui:next' into filter-button-tooltip-format-value
2 parents db19c32 + 1223599 commit 9fbc4d5

File tree

72 files changed

+412
-1262
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+412
-1262
lines changed

CHANGELOG.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1368,8 +1368,7 @@ We'd like to offer a big thanks to the 9 contributors who made this release poss
13681368
- The toolbar related translation keys have been renamed to better fit their usage:
13691369

13701370
```diff
1371-
// Same on all other pickers
1372-
<DatePicker
1371+
<LocalizationProvider
13731372
localeText={{
13741373
- datePickerDefaultToolbarTitle: 'Date Picker',
13751374
+ datePickerToolbarTitle: 'Date Picker',

docs/data/date-pickers/field-customization/HeadlessBrowserDateField.js

Lines changed: 0 additions & 60 deletions
This file was deleted.

docs/data/date-pickers/field-customization/HeadlessBrowserDateField.tsx.preview

Lines changed: 0 additions & 6 deletions
This file was deleted.

docs/data/date-pickers/field-customization/JoyHeadlessDateField.js

Lines changed: 0 additions & 60 deletions
This file was deleted.

docs/data/date-pickers/field-customization/JoyHeadlessDateField.tsx.preview

Lines changed: 0 additions & 6 deletions
This file was deleted.

docs/data/date-pickers/localization/data.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
"languageTag": "it-IT",
6868
"importName": "itIT",
6969
"localeName": "Italian",
70-
"missingKeysCount": 11,
70+
"missingKeysCount": 0,
7171
"totalKeysCount": 34,
7272
"githubLink": "https://github.com/mui/mui-x/blob/next/packages/x-date-pickers/src/locales/itIT.ts/"
7373
},

docs/data/migration/migration-pickers-v5/migration-pickers-v5.md

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<p class="description">This guide describes the changes needed to migrate the Date and Time Pickers from v5 to v6.</p>
44

5-
## Start using the alpha release
5+
## Start using the prerelease
66

77
In `package.json`, change the version of the date pickers package to `next`.
88

@@ -11,7 +11,7 @@ In `package.json`, change the version of the date pickers package to `next`.
1111
+"@mui/x-date-pickers": "next",
1212
```
1313

14-
Using `next` ensures that it will always use the latest v6 alpha release, but you can also use a fixed version, like `6.0.0-alpha.0`.
14+
Using `next` ensures that it will always use the latest v6 alpha release, but you can also use a fixed version, like `6.0.0-beta.1`.
1515

1616
Since v6 is a major release, it contains some changes that affect the public API.
1717
These changes were done for consistency, improve stability and make room for new features.
@@ -41,7 +41,7 @@ All other changes must be handled manually.
4141

4242
## Picker components
4343

44-
### Rename the `inputFormat` prop
44+
### Rename the `inputFormat` prop
4545

4646
The `inputFormat` prop has been renamed to `format` on all the pickers components.
4747

@@ -219,7 +219,7 @@ The `shouldDisableTime` prop signature has been changed. Either rename the prop
219219

220220
### ✅ Do not import adapter from `@date-io`
221221

222-
In v5, it was possible to import adapters either from `@date-io` or `@mui/x-date-pickers` which were the same.
222+
In v5, it was possible to import adapters either from either `@date-io` or `@mui/x-date-pickers` which were the same.
223223
In v6, the adapters are extended by `@mui/x-date-pickers` to support [fields components](/x/react-date-pickers/fields/).
224224
Which means adapters can not be imported from `@date-io` anymore. They need to be imported from `@mui/x-date-pickers` or `@mui/x-date-pickers-pro`.
225225
Otherwise, some methods will be missing.
@@ -286,7 +286,7 @@ Component names in the theme have changed as well:
286286

287287
### ✅ Rename `date` prop to `value`
288288

289-
The `date` prop has been renamed `value` on `MonthCalendar`, `YearCalendar`, `TimeClock`, and `DateCalendar` (components renamed in previous section):
289+
The `date` prop has been renamed to `value` on `MonthCalendar`, `YearCalendar`, `TimeClock`, and `DateCalendar` (components renamed in previous section):
290290

291291
```diff
292292
-<MonthPicker date={dayjs()} />
@@ -479,11 +479,11 @@ For example, the `ToolbarComponent` has been replaced by a `Toolbar` component s
479479
/>
480480
```
481481

482-
- The toolbar related translation keys have been renamed to better fit their usage:
482+
- The toolbar related translation keys have been renamed to better fit their usage:
483483

484484
```diff
485-
<DatePicker
486-
localeText={{
485+
<LocalizationProvider
486+
localeText={{
487487
- datePickerDefaultToolbarTitle: 'Date Picker',
488488
+ datePickerToolbarTitle: 'Date Picker',
489489

@@ -495,7 +495,7 @@ For example, the `ToolbarComponent` has been replaced by a `Toolbar` component s
495495

496496
- dateRangePickerDefaultToolbarTitle: 'Date Range Picker',
497497
+ dateRangePickerToolbarTitle: 'Date Range Picker',
498-
}}
498+
}}
499499
/>
500500
```
501501

@@ -583,7 +583,7 @@ For example, the `ToolbarComponent` has been replaced by a `Toolbar` component s
583583

584584
### Action bar
585585

586-
- The `action` prop of the `actionBar` component slot can no longer receive a callback.
586+
- The `actions` prop of the `actionBar` component slot can no longer receive a callback.
587587
Instead, you can pass a callback at the component slot props level
588588

589589
```diff
@@ -735,7 +735,7 @@ For example, the `ToolbarComponent` has been replaced by a `Toolbar` component s
735735

736736
### ✅ Left arrow button
737737

738-
- The component slot `LeftArrowButton` has been renamed `PreviousIconButton`:
738+
- The component slot `LeftArrowButton` has been renamed to `PreviousIconButton`:
739739

740740
```diff
741741
<DatePicker
@@ -753,7 +753,7 @@ For example, the `ToolbarComponent` has been replaced by a `Toolbar` component s
753753

754754
### ✅ Right arrow button
755755

756-
- The component slot `RightArrowButton` has been renamed `NextIconButton`:
756+
- The component slot `RightArrowButton` has been renamed to `NextIconButton`:
757757

758758
```diff
759759
<DatePicker
@@ -783,7 +783,7 @@ For example, the `ToolbarComponent` has been replaced by a `Toolbar` component s
783783

784784
### ✅ Input adornment
785785

786-
- The `InputAdornmentProps` prop has been replaced by a `inputAdornment` component slot props:
786+
- The `InputAdornmentProps` prop has been replaced by an `inputAdornment` component slot props:
787787

788788
```diff
789789
<DatePicker
@@ -794,7 +794,7 @@ For example, the `ToolbarComponent` has been replaced by a `Toolbar` component s
794794

795795
### ✅ Open Picker Button
796796

797-
- The `OpenPickerButtonProps` prop has been replaced by a `openPickerButton` component slot props:
797+
- The `OpenPickerButtonProps` prop has been replaced by an `openPickerButton` component slot props:
798798

799799
```diff
800800
<DatePicker
@@ -853,3 +853,17 @@ Component name changes are also reflected in `themeAugmentation`:
853853
},
854854
});
855855
```
856+
857+
## Rename `components` to `slots` (optional)
858+
859+
The `components` and `componentsProps` props are being renamed to `slots` and `slotProps` props respectively.
860+
This is a slow and ongoing effort between the different MUI libraries.
861+
To smooth the transition, pickers support both the `components` props which are deprecated, and the new `slots` props.
862+
863+
If you would like to use the new API and do not want to see deprecated prop usage, consider running `rename-components-to-slots` codemod handling the prop renaming.
864+
865+
```sh
866+
npx @mui/x-codemod v6.0.0/pickers/rename-components-to-slots <path>
867+
```
868+
869+
Take a look at [the RFC](https://github.com/mui/material-ui/issues/33416) for more information.

0 commit comments

Comments
 (0)