@mui/x-date-pickers-pro 7.0.0-alpha.3 → 7.0.0-alpha.5
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 +245 -0
- package/DateRangeCalendar/DateRangeCalendar.js +2 -2
- package/DateRangeCalendar/DateRangeCalendar.types.d.ts +6 -6
- package/DateRangeCalendar/index.d.ts +1 -1
- package/DateRangePicker/DateRangePicker.js +6 -1
- package/DateRangePicker/DateRangePicker.types.d.ts +6 -6
- package/DateRangePicker/index.d.ts +1 -1
- package/DateRangePicker/shared.d.ts +5 -5
- package/DesktopDateRangePicker/DesktopDateRangePicker.js +6 -1
- package/DesktopDateRangePicker/DesktopDateRangePicker.types.d.ts +6 -6
- package/DesktopDateRangePicker/index.d.ts +1 -1
- package/MobileDateRangePicker/MobileDateRangePicker.js +6 -1
- package/MobileDateRangePicker/MobileDateRangePicker.types.d.ts +6 -6
- package/MobileDateRangePicker/index.d.ts +1 -1
- package/MultiInputDateRangeField/MultiInputDateRangeField.js +15 -52
- package/MultiInputDateRangeField/MultiInputDateRangeField.types.d.ts +4 -4
- package/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +15 -52
- package/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.types.d.ts +4 -4
- package/MultiInputTimeRangeField/MultiInputTimeRangeField.js +15 -52
- package/MultiInputTimeRangeField/MultiInputTimeRangeField.types.d.ts +4 -4
- package/SingleInputDateRangeField/SingleInputDateRangeField.js +17 -50
- package/SingleInputDateRangeField/SingleInputDateRangeField.types.d.ts +6 -9
- package/SingleInputDateRangeField/useSingleInputDateRangeField.d.ts +2 -2
- package/SingleInputDateRangeField/useSingleInputDateRangeField.js +1 -5
- package/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +17 -50
- package/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.types.d.ts +5 -9
- package/SingleInputDateTimeRangeField/useSingleInputDateTimeRangeField.d.ts +2 -2
- package/SingleInputDateTimeRangeField/useSingleInputDateTimeRangeField.js +1 -5
- package/SingleInputTimeRangeField/SingleInputTimeRangeField.js +18 -51
- package/SingleInputTimeRangeField/SingleInputTimeRangeField.types.d.ts +5 -9
- package/SingleInputTimeRangeField/useSingleInputTimeRangeField.d.ts +2 -2
- package/SingleInputTimeRangeField/useSingleInputTimeRangeField.js +1 -5
- package/StaticDateRangePicker/StaticDateRangePicker.types.d.ts +6 -6
- package/StaticDateRangePicker/index.d.ts +1 -1
- package/index.js +1 -1
- package/internals/hooks/useDesktopRangePicker/index.d.ts +1 -1
- package/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.js +3 -1
- package/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.types.d.ts +7 -7
- package/internals/hooks/useEnrichedRangePickerFieldProps.d.ts +6 -5
- package/internals/hooks/useMobileRangePicker/index.d.ts +1 -1
- package/internals/hooks/useMobileRangePicker/useMobileRangePicker.js +3 -1
- package/internals/hooks/useMobileRangePicker/useMobileRangePicker.types.d.ts +7 -7
- package/internals/hooks/useMultiInputRangeField/useMultiInputDateRangeField.d.ts +1 -1
- package/internals/hooks/useMultiInputRangeField/useMultiInputDateRangeField.js +2 -10
- package/internals/hooks/useMultiInputRangeField/useMultiInputDateTimeRangeField.d.ts +1 -1
- package/internals/hooks/useMultiInputRangeField/useMultiInputDateTimeRangeField.js +2 -10
- package/internals/hooks/useMultiInputRangeField/useMultiInputRangeField.types.d.ts +0 -2
- package/internals/hooks/useMultiInputRangeField/useMultiInputTimeRangeField.d.ts +1 -1
- package/internals/hooks/useMultiInputRangeField/useMultiInputTimeRangeField.js +2 -10
- package/internals/hooks/useStaticRangePicker/index.d.ts +1 -1
- package/internals/hooks/useStaticRangePicker/useStaticRangePicker.types.d.ts +5 -5
- package/internals/models/rangePickerProps.d.ts +5 -0
- package/internals/utils/releaseInfo.js +1 -1
- package/legacy/DateRangeCalendar/DateRangeCalendar.js +2 -2
- package/legacy/DateRangePicker/DateRangePicker.js +6 -1
- package/legacy/DesktopDateRangePicker/DesktopDateRangePicker.js +6 -1
- package/legacy/MobileDateRangePicker/MobileDateRangePicker.js +6 -1
- package/legacy/MultiInputDateRangeField/MultiInputDateRangeField.js +15 -48
- package/legacy/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +15 -48
- package/legacy/MultiInputTimeRangeField/MultiInputTimeRangeField.js +15 -48
- package/legacy/SingleInputDateRangeField/SingleInputDateRangeField.js +19 -47
- package/legacy/SingleInputDateRangeField/useSingleInputDateRangeField.js +1 -4
- package/legacy/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +19 -47
- package/legacy/SingleInputDateTimeRangeField/useSingleInputDateTimeRangeField.js +1 -4
- package/legacy/SingleInputTimeRangeField/SingleInputTimeRangeField.js +20 -48
- package/legacy/SingleInputTimeRangeField/useSingleInputTimeRangeField.js +1 -4
- package/legacy/index.js +1 -1
- package/legacy/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.js +3 -1
- package/legacy/internals/hooks/useMobileRangePicker/useMobileRangePicker.js +3 -1
- package/legacy/internals/hooks/useMultiInputRangeField/useMultiInputDateRangeField.js +2 -10
- package/legacy/internals/hooks/useMultiInputRangeField/useMultiInputDateTimeRangeField.js +2 -10
- package/legacy/internals/hooks/useMultiInputRangeField/useMultiInputTimeRangeField.js +2 -10
- package/legacy/internals/utils/releaseInfo.js +1 -1
- package/modern/DateRangeCalendar/DateRangeCalendar.js +2 -2
- package/modern/DateRangePicker/DateRangePicker.js +6 -1
- package/modern/DesktopDateRangePicker/DesktopDateRangePicker.js +6 -1
- package/modern/MobileDateRangePicker/MobileDateRangePicker.js +6 -1
- package/modern/MultiInputDateRangeField/MultiInputDateRangeField.js +15 -52
- package/modern/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +15 -52
- package/modern/MultiInputTimeRangeField/MultiInputTimeRangeField.js +15 -52
- package/modern/SingleInputDateRangeField/SingleInputDateRangeField.js +17 -50
- package/modern/SingleInputDateRangeField/useSingleInputDateRangeField.js +1 -5
- package/modern/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +17 -50
- package/modern/SingleInputDateTimeRangeField/useSingleInputDateTimeRangeField.js +1 -5
- package/modern/SingleInputTimeRangeField/SingleInputTimeRangeField.js +18 -51
- package/modern/SingleInputTimeRangeField/useSingleInputTimeRangeField.js +1 -5
- package/modern/index.js +1 -1
- package/modern/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.js +3 -1
- package/modern/internals/hooks/useMobileRangePicker/useMobileRangePicker.js +3 -1
- package/modern/internals/hooks/useMultiInputRangeField/useMultiInputDateRangeField.js +2 -10
- package/modern/internals/hooks/useMultiInputRangeField/useMultiInputDateTimeRangeField.js +2 -10
- package/modern/internals/hooks/useMultiInputRangeField/useMultiInputTimeRangeField.js +2 -10
- package/modern/internals/utils/releaseInfo.js +1 -1
- package/node/DateRangeCalendar/DateRangeCalendar.js +2 -2
- package/node/DateRangePicker/DateRangePicker.js +6 -1
- package/node/DesktopDateRangePicker/DesktopDateRangePicker.js +6 -1
- package/node/MobileDateRangePicker/MobileDateRangePicker.js +6 -1
- package/node/MultiInputDateRangeField/MultiInputDateRangeField.js +14 -51
- package/node/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +14 -51
- package/node/MultiInputTimeRangeField/MultiInputTimeRangeField.js +14 -51
- package/node/SingleInputDateRangeField/SingleInputDateRangeField.js +17 -50
- package/node/SingleInputDateRangeField/useSingleInputDateRangeField.js +1 -5
- package/node/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +17 -50
- package/node/SingleInputDateTimeRangeField/useSingleInputDateTimeRangeField.js +1 -5
- package/node/SingleInputTimeRangeField/SingleInputTimeRangeField.js +18 -51
- package/node/SingleInputTimeRangeField/useSingleInputTimeRangeField.js +1 -5
- package/node/index.js +1 -1
- package/node/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.js +3 -1
- package/node/internals/hooks/useMobileRangePicker/useMobileRangePicker.js +3 -1
- package/node/internals/hooks/useMultiInputRangeField/useMultiInputDateRangeField.js +2 -10
- package/node/internals/hooks/useMultiInputRangeField/useMultiInputDateTimeRangeField.js +2 -10
- package/node/internals/hooks/useMultiInputRangeField/useMultiInputTimeRangeField.js +2 -10
- package/node/internals/utils/releaseInfo.js +1 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,169 @@
|
|
|
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.5
|
|
7
|
+
|
|
8
|
+
_Dec 14, 2023_
|
|
9
|
+
|
|
10
|
+
We'd like to offer a big thanks to the 9 contributors who made this release possible. Here are some highlights ✨:
|
|
11
|
+
|
|
12
|
+
- 💫 New recipe added for the Data Grid
|
|
13
|
+
- 🌍 Improve Swedish (sv-SE) and Urdu (ur-PK) locales on the Data Grid
|
|
14
|
+
- 🐞 Bugfixes
|
|
15
|
+
|
|
16
|
+
### Data Grid
|
|
17
|
+
|
|
18
|
+
#### Breaking changes
|
|
19
|
+
|
|
20
|
+
- The `instanceId` prop is now required for state selectors.
|
|
21
|
+
This prop is used to distinguish between multiple Data Grid instances on the same page.
|
|
22
|
+
See [migration docs](https://next.mui.com/x/migration/migration-data-grid-v6/#instanceid-prop-is-required-for-state-selectors) for more details.
|
|
23
|
+
|
|
24
|
+
#### `@mui/x-data-grid@7.0.0-alpha.5`
|
|
25
|
+
|
|
26
|
+
- [DataGrid] Make `instanceId` required for state selectors (#11395) @cherniavskii
|
|
27
|
+
- [DataGrid] Recipe for grouped rows autosizing (#11401) @michelengelen
|
|
28
|
+
- [l10n] Improve Swedish (sv-SE) locale (#11373) @fredrikcarlbom
|
|
29
|
+
- [l10n] Improve Urdu (ur-PK) locale (#11400) @MBilalShafi
|
|
30
|
+
|
|
31
|
+
#### `@mui/x-data-grid-pro@7.0.0-alpha.5` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
32
|
+
|
|
33
|
+
Same changes as in `@mui/x-data-grid@7.0.0-alpha.5`.
|
|
34
|
+
|
|
35
|
+
#### `@mui/x-data-grid-premium@7.0.0-alpha.5` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
36
|
+
|
|
37
|
+
Same changes as in `@mui/x-data-grid-pro@7.0.0-alpha.5`.
|
|
38
|
+
|
|
39
|
+
### Date Pickers
|
|
40
|
+
|
|
41
|
+
#### Breaking changes
|
|
42
|
+
|
|
43
|
+
- The slot interfaces got renamed to match with `@mui/base` naming.
|
|
44
|
+
The `SlotsComponent` suffix has been replaced with `Slots` and `SlotsComponentsProps` with `SlotProps`.
|
|
45
|
+
|
|
46
|
+
```diff
|
|
47
|
+
- DateCalendarSlotsComponent
|
|
48
|
+
+ DateCalendarSlots
|
|
49
|
+
- DateCalendarSlotsComponentsProps
|
|
50
|
+
+ DateCalendarSlotProps
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
#### `@mui/x-date-pickers@7.0.0-alpha.5`
|
|
54
|
+
|
|
55
|
+
- [fields] Support empty sections (#10307) @flaviendelangle
|
|
56
|
+
- [pickers] Fix field types to avoid error on latest `@types/react` version (#11397) @LukasTy
|
|
57
|
+
- [pickers] Remove all relative imports to the internals index file (#11375) @flaviendelangle
|
|
58
|
+
- [pickers] Rename slots interfaces (#11339) @alexfauquette
|
|
59
|
+
- [pickers] Simplify the API of the field hooks (#11371) @flaviendelangle
|
|
60
|
+
- [pickers] Support name prop (#11025) @gitstart
|
|
61
|
+
|
|
62
|
+
#### `@mui/x-date-pickers-pro@7.0.0-alpha.5` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
63
|
+
|
|
64
|
+
Same changes as in `@mui/x-date-pickers@7.0.0-alpha.5`, plus:
|
|
65
|
+
|
|
66
|
+
- [DateRangePicker] Fix `autoFocus` behavior (#11273) @kealjones-wk
|
|
67
|
+
|
|
68
|
+
### Charts / `@mui/x-charts@7.0.0-alpha.5`
|
|
69
|
+
|
|
70
|
+
- [charts] Fix size overflow (#11385) @alexfauquette
|
|
71
|
+
|
|
72
|
+
### `@mui/x-codemod@7.0.0-alpha.5`
|
|
73
|
+
|
|
74
|
+
- [codemod] Add `cellSelection` codemod and update migration guide (#11353) @MBilalShafi
|
|
75
|
+
|
|
76
|
+
### Docs
|
|
77
|
+
|
|
78
|
+
- [docs] Respect GoT books (@janoma) (#11387) @alexfauquette
|
|
79
|
+
|
|
80
|
+
### Core
|
|
81
|
+
|
|
82
|
+
- [core] Automate cherry-pick of PRs from `next` -> `master` (#11382) @MBilalShafi
|
|
83
|
+
- [github] Update `no-response` workflow (#11369) @MBilalShafi
|
|
84
|
+
- [test] Fix flaky screenshots (#11388) @cherniavskii
|
|
85
|
+
|
|
86
|
+
## 7.0.0-alpha.4
|
|
87
|
+
|
|
88
|
+
_Dec 8, 2023_
|
|
89
|
+
|
|
90
|
+
We'd like to offer a big thanks to the 11 contributors who made this release possible. Here are some highlights ✨:
|
|
91
|
+
|
|
92
|
+
- 🚀 The scatter charts now use voronoi to trigger items
|
|
93
|
+
|
|
94
|
+
Users needed to hover the item to highlight the scatter item or show the tooltip.
|
|
95
|
+
Now they can interact with data by triggering the closest element. See the [docs page](https://next.mui.com/x/react-charts/scatter/#interaction) for more info.
|
|
96
|
+
|
|
97
|
+
- 📚 Add [Pickers FAQ page](https://next.mui.com/x/react-date-pickers/faq/)
|
|
98
|
+
- 🎉 The Data Grid Header filters feature is now stable
|
|
99
|
+
- 🌍 Improve Danish (da-DK) locale on Data Grid
|
|
100
|
+
- 🐞 Bugfixes
|
|
101
|
+
|
|
102
|
+
### Data Grid
|
|
103
|
+
|
|
104
|
+
#### Breaking changes
|
|
105
|
+
|
|
106
|
+
- The header filters feature is now stable. `unstable_` prefix is removed from prop `headerFilters` and related exports.
|
|
107
|
+
See [migration docs](https://next.mui.com/x/migration/migration-data-grid-v6/#filtering) for more details.
|
|
108
|
+
|
|
109
|
+
- The `GridColDef['type']` has been narrowed down to only accept the built-in column types.
|
|
110
|
+
TypeScript users need to use the `GridColDef` interface when defining columns:
|
|
111
|
+
|
|
112
|
+
```tsx
|
|
113
|
+
// 🛑 `type` is inferred as `string` and is too wide
|
|
114
|
+
const columns = [{ type: 'number', field: 'id' }];
|
|
115
|
+
<DataGrid columns={columns} />;
|
|
116
|
+
|
|
117
|
+
// ✅ `type` is `'number'`
|
|
118
|
+
const columns: GridColDef[] = [{ type: 'number', field: 'id' }];
|
|
119
|
+
<DataGrid columns={columns} />;
|
|
120
|
+
|
|
121
|
+
// ✅ Alternalively, `as const` can be used to narrow down the type
|
|
122
|
+
const columns = [{ type: 'number' as const, field: 'id' }];
|
|
123
|
+
<DataGrid columns={columns} />;
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
#### `@mui/x-data-grid@7.0.0-alpha.4`
|
|
127
|
+
|
|
128
|
+
- [DataGrid] Added a guard for reorder cells (#11159) @michelengelen
|
|
129
|
+
- [DataGrid] Narrow down `GridColDef['type']` (#11270) @cherniavskii
|
|
130
|
+
- [l10n] Improve Danish (da-DK) locale (#11304) @goibon
|
|
131
|
+
|
|
132
|
+
#### `@mui/x-data-grid-pro@7.0.0-alpha.4` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
133
|
+
|
|
134
|
+
Same changes as in `@mui/x-data-grid@7.0.0-alpha.4`, plus:
|
|
135
|
+
|
|
136
|
+
- [DataGridPro] Make header filters feature stable (#11243) @MBilalShafi
|
|
137
|
+
|
|
138
|
+
#### `@mui/x-data-grid-premium@7.0.0-alpha.4` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
139
|
+
|
|
140
|
+
Same changes as in `@mui/x-data-grid-pro@7.0.0-alpha.4`.
|
|
141
|
+
|
|
142
|
+
### Date Pickers
|
|
143
|
+
|
|
144
|
+
#### `@mui/x-date-pickers@7.0.0-alpha.4`
|
|
145
|
+
|
|
146
|
+
- [fields] Rework `PickersTextField` (#11258) @flaviendelangle
|
|
147
|
+
- [pickers] Fix `MultiSectionDigitalClock` issues (#11305) @LukasTy
|
|
148
|
+
- [pickers] Fix views height consistency (#11337) @LukasTy
|
|
149
|
+
|
|
150
|
+
#### `@mui/x-date-pickers-pro@7.0.0-alpha.4` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
151
|
+
|
|
152
|
+
Same changes as in `@mui/x-date-pickers@7.0.0-alpha.4`.
|
|
153
|
+
|
|
154
|
+
### Charts / `@mui/x-charts@7.0.0-alpha.4`
|
|
155
|
+
|
|
156
|
+
- [charts] Remove animation on sparkline (#11311) @oliviertassinari
|
|
157
|
+
- [charts] Use voronoi cells to trigger interaction with scatter items (#10981) @alexfauquette
|
|
158
|
+
- [charts] Add `@mui/utils` as a dependency (#11351) @michelengelen
|
|
159
|
+
|
|
160
|
+
### Docs
|
|
161
|
+
|
|
162
|
+
- [docs] Add FAQ page (#11271) @noraleonte
|
|
163
|
+
- [docs] Add a doc section on how to override the start of the week with each adapter (#11223) @flaviendelangle
|
|
164
|
+
- [docs] Added params to `onPaginationModelChange` docs (#10191) @JFBenzs
|
|
165
|
+
- [docs] Fix typo (#11324) @cadam11
|
|
166
|
+
- [docs] Improve `DemoContainer` styling coverage (#11315) @LukasTy
|
|
167
|
+
- [docs] General revision of the Charts docs (#11249) @danilo-leal
|
|
168
|
+
|
|
6
169
|
## 7.0.0-alpha.3
|
|
7
170
|
|
|
8
171
|
_Dec 4, 2023_
|
|
@@ -866,6 +1029,88 @@ Here is an example of the renaming for the `<ChartsTooltip />` component.
|
|
|
866
1029
|
- [core] Update release instructions as per v7 configuration (#10962) @MBilalShafi
|
|
867
1030
|
- [license] Correctly throw errors (#10924) @oliviertassinari
|
|
868
1031
|
|
|
1032
|
+
## 6.18.5
|
|
1033
|
+
|
|
1034
|
+
_Dec 14, 2023_
|
|
1035
|
+
|
|
1036
|
+
We'd like to offer a big thanks to the 7 contributors who made this release possible. Here are some highlights ✨:
|
|
1037
|
+
|
|
1038
|
+
- 🌍 Improve Swedish (sv-SE) and Urdu (ur-PK) locales on the Data Grid
|
|
1039
|
+
- 🐞 Bugfixes
|
|
1040
|
+
|
|
1041
|
+
### Data Grid
|
|
1042
|
+
|
|
1043
|
+
#### `@mui/x-data-grid@6.18.5`
|
|
1044
|
+
|
|
1045
|
+
- [l10n] Improve Swedish (sv-SE) locale (#11379) @fredrikcarlbom
|
|
1046
|
+
- [l10n] Improve Urdu (ur-PK) locale for data grid (#11409) @MBilalShafi
|
|
1047
|
+
|
|
1048
|
+
#### `@mui/x-data-grid-pro@6.18.5` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
1049
|
+
|
|
1050
|
+
Same changes as in `@mui/x-data-grid@6.18.5`.
|
|
1051
|
+
|
|
1052
|
+
#### `@mui/x-data-grid-premium@6.18.5` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
1053
|
+
|
|
1054
|
+
Same changes as in `@mui/x-data-grid-pro@6.18.5`.
|
|
1055
|
+
|
|
1056
|
+
### Date Pickers
|
|
1057
|
+
|
|
1058
|
+
#### `@mui/x-date-pickers@6.18.5`
|
|
1059
|
+
|
|
1060
|
+
- [pickers] Fix field types to avoid error on latest `@types/react` version (#11398) @LukasTy
|
|
1061
|
+
- [pickers] Support name prop (#11380) @gitstart
|
|
1062
|
+
|
|
1063
|
+
#### `@mui/x-date-pickers-pro@6.18.5` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
1064
|
+
|
|
1065
|
+
Same changes as in `@mui/x-date-pickers@6.18.5`, plus:
|
|
1066
|
+
|
|
1067
|
+
- [DateRangePicker] Fix `autoFocus` behavior (#11376) @kealjones-wk
|
|
1068
|
+
|
|
1069
|
+
### Docs
|
|
1070
|
+
|
|
1071
|
+
- [docs] Respect GoT books (#11294) @janoma
|
|
1072
|
+
- [test] Fix flaky screenshots (#11391) @cherniavskii
|
|
1073
|
+
|
|
1074
|
+
## 6.18.4
|
|
1075
|
+
|
|
1076
|
+
_Dec 8, 2023_
|
|
1077
|
+
|
|
1078
|
+
We'd like to offer a big thanks to the 6 contributors who made this release possible. Here are some highlights ✨:
|
|
1079
|
+
|
|
1080
|
+
- 📚 Add [Pickers FAQ page](https://mui.com/x/react-date-pickers/faq/)
|
|
1081
|
+
- 🌍 Improve Danish (da-DK) locale on Data Grid
|
|
1082
|
+
- 🐞 Bugfixes
|
|
1083
|
+
|
|
1084
|
+
### Data Grid
|
|
1085
|
+
|
|
1086
|
+
#### `@mui/x-data-grid@6.18.4`
|
|
1087
|
+
|
|
1088
|
+
- [DataGrid] Fix cell slot style override (#11215) @oliviertassinari
|
|
1089
|
+
- [l10n] Improve Danish (da-DK) locale (#11346) @goibon
|
|
1090
|
+
|
|
1091
|
+
#### `@mui/x-data-grid-pro@6.18.4` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
1092
|
+
|
|
1093
|
+
Same changes as in `@mui/x-data-grid@6.18.4`.
|
|
1094
|
+
|
|
1095
|
+
#### `@mui/x-data-grid-premium@6.18.4` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
1096
|
+
|
|
1097
|
+
Same changes as in `@mui/x-data-grid-pro@6.18.4`.
|
|
1098
|
+
|
|
1099
|
+
### Date Pickers
|
|
1100
|
+
|
|
1101
|
+
#### `@mui/x-date-pickers@6.18.4`
|
|
1102
|
+
|
|
1103
|
+
- [pickers] Fix `MultiSectionDigitalClock` issues (#11308) @LukasTy
|
|
1104
|
+
|
|
1105
|
+
#### `@mui/x-date-pickers-pro@6.18.4` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
1106
|
+
|
|
1107
|
+
Same changes as in `@mui/x-date-pickers@6.18.4`.
|
|
1108
|
+
|
|
1109
|
+
### Docs
|
|
1110
|
+
|
|
1111
|
+
- [docs] Fix typo (#11323) @cadam11
|
|
1112
|
+
- [docs] Add FAQ page (#11347) @noraleonte
|
|
1113
|
+
|
|
869
1114
|
## 6.18.3
|
|
870
1115
|
|
|
871
1116
|
_Dec 4, 2023_
|
|
@@ -44,7 +44,7 @@ const DateRangeCalendarMonthContainer = styled('div', {
|
|
|
44
44
|
}
|
|
45
45
|
}));
|
|
46
46
|
const DateRangeCalendarArrowSwitcher = styled(PickersArrowSwitcher)({
|
|
47
|
-
padding: '
|
|
47
|
+
padding: '12px 16px 4px 16px',
|
|
48
48
|
display: 'flex',
|
|
49
49
|
alignItems: 'center',
|
|
50
50
|
justifyContent: 'space-between'
|
|
@@ -477,7 +477,7 @@ const DateRangeCalendar = /*#__PURE__*/React.forwardRef(function DateRangeCalend
|
|
|
477
477
|
renderLoading: renderLoading,
|
|
478
478
|
slots: slotsForDayCalendar,
|
|
479
479
|
slotProps: slotPropsForDayCalendar,
|
|
480
|
-
autoFocus: month === focusedMonth,
|
|
480
|
+
autoFocus: visibleMonths[month] === focusedMonth,
|
|
481
481
|
fixedWeekNumber: fixedWeekNumber,
|
|
482
482
|
displayWeekNumber: displayWeekNumber,
|
|
483
483
|
timezone: timezone
|
|
@@ -3,14 +3,14 @@ import { SxProps } from '@mui/system';
|
|
|
3
3
|
import { SlotComponentProps } from '@mui/base/utils';
|
|
4
4
|
import { Theme } from '@mui/material/styles';
|
|
5
5
|
import { TimezoneProps } from '@mui/x-date-pickers/models';
|
|
6
|
-
import { PickersCalendarHeader, PickersCalendarHeaderProps,
|
|
7
|
-
import { BaseDateValidationProps, DefaultizedProps, ExportedDayCalendarProps,
|
|
6
|
+
import { PickersCalendarHeader, PickersCalendarHeaderProps, PickersCalendarHeaderSlots, PickersCalendarHeaderSlotProps } from '@mui/x-date-pickers/PickersCalendarHeader';
|
|
7
|
+
import { BaseDateValidationProps, DefaultizedProps, ExportedDayCalendarProps, DayCalendarSlots, DayCalendarSlotProps, PickersArrowSwitcherSlots, PickersArrowSwitcherSlotProps, PickerSelectionState, DayCalendarProps, ExportedUseViewsOptions } from '@mui/x-date-pickers/internals';
|
|
8
8
|
import { DateRange, DayRangeValidationProps } from '../internals/models';
|
|
9
9
|
import { DateRangeCalendarClasses } from './dateRangeCalendarClasses';
|
|
10
10
|
import { DateRangePickerDay, DateRangePickerDayProps } from '../DateRangePickerDay';
|
|
11
11
|
import { UseRangePositionProps } from '../internals/hooks/useRangePosition';
|
|
12
12
|
export type DateRangePosition = 'start' | 'end';
|
|
13
|
-
export interface
|
|
13
|
+
export interface DateRangeCalendarSlots<TDate> extends PickersArrowSwitcherSlots, Omit<DayCalendarSlots<TDate>, 'day'>, PickersCalendarHeaderSlots {
|
|
14
14
|
/**
|
|
15
15
|
* Custom component for calendar header.
|
|
16
16
|
* Check the [PickersCalendarHeader](https://mui.com/x/api/date-pickers/pickers-calendar-header/) component.
|
|
@@ -24,7 +24,7 @@ export interface DateRangeCalendarSlotsComponent<TDate> extends PickersArrowSwit
|
|
|
24
24
|
*/
|
|
25
25
|
day?: React.ElementType<DateRangePickerDayProps<TDate>>;
|
|
26
26
|
}
|
|
27
|
-
export interface
|
|
27
|
+
export interface DateRangeCalendarSlotProps<TDate> extends PickersArrowSwitcherSlotProps, Omit<DayCalendarSlotProps<TDate>, 'day'>, PickersCalendarHeaderSlotProps<TDate> {
|
|
28
28
|
calendarHeader?: SlotComponentProps<typeof PickersCalendarHeader, {}, DateRangeCalendarProps<TDate>>;
|
|
29
29
|
day?: SlotComponentProps<typeof DateRangePickerDay, {}, DayCalendarProps<TDate> & {
|
|
30
30
|
day: TDate;
|
|
@@ -107,12 +107,12 @@ export interface DateRangeCalendarProps<TDate> extends ExportedDateRangeCalendar
|
|
|
107
107
|
* Overridable component slots.
|
|
108
108
|
* @default {}
|
|
109
109
|
*/
|
|
110
|
-
slots?:
|
|
110
|
+
slots?: DateRangeCalendarSlots<TDate>;
|
|
111
111
|
/**
|
|
112
112
|
* The props used for each component slot.
|
|
113
113
|
* @default {}
|
|
114
114
|
*/
|
|
115
|
-
slotProps?:
|
|
115
|
+
slotProps?: DateRangeCalendarSlotProps<TDate>;
|
|
116
116
|
}
|
|
117
117
|
export interface DateRangeCalendarOwnerState<TDate> extends DateRangeCalendarProps<TDate> {
|
|
118
118
|
isDragging: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { DateRangeCalendar } from './DateRangeCalendar';
|
|
2
|
-
export type { DateRangeCalendarProps,
|
|
2
|
+
export type { DateRangeCalendarProps, DateRangeCalendarSlots, DateRangeCalendarSlotProps, ExportedDateRangeCalendarProps, } from './DateRangeCalendar.types';
|
|
3
3
|
export { getDateRangeCalendarUtilityClass, dateRangeCalendarClasses, } from './dateRangeCalendarClasses';
|
|
4
4
|
export type { DateRangeCalendarClassKey, DateRangeCalendarClasses, } from './dateRangeCalendarClasses';
|
|
@@ -182,6 +182,11 @@ process.env.NODE_ENV !== "production" ? DateRangePicker.propTypes = {
|
|
|
182
182
|
* Minimal selectable date.
|
|
183
183
|
*/
|
|
184
184
|
minDate: PropTypes.any,
|
|
185
|
+
/**
|
|
186
|
+
* Name attribute used by the `input` element in the Field.
|
|
187
|
+
* Ignored if the field has several inputs.
|
|
188
|
+
*/
|
|
189
|
+
name: PropTypes.string,
|
|
185
190
|
/**
|
|
186
191
|
* Callback fired when the value is accepted.
|
|
187
192
|
* @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value.
|
|
@@ -268,7 +273,7 @@ process.env.NODE_ENV !== "production" ? DateRangePicker.propTypes = {
|
|
|
268
273
|
* 4. If `null` is provided, no section will be selected
|
|
269
274
|
* If not provided, the selected sections will be handled internally.
|
|
270
275
|
*/
|
|
271
|
-
selectedSections: PropTypes.oneOfType([PropTypes.oneOf(['all', 'day', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'weekDay', 'year']), PropTypes.number, PropTypes.shape({
|
|
276
|
+
selectedSections: PropTypes.oneOfType([PropTypes.oneOf(['all', 'day', 'empty', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'weekDay', 'year']), PropTypes.number, PropTypes.shape({
|
|
272
277
|
endIndex: PropTypes.number.isRequired,
|
|
273
278
|
startIndex: PropTypes.number.isRequired
|
|
274
279
|
})]),
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { DesktopDateRangePickerProps,
|
|
2
|
-
import { MobileDateRangePickerProps,
|
|
3
|
-
export interface
|
|
1
|
+
import { DesktopDateRangePickerProps, DesktopDateRangePickerSlots, DesktopDateRangePickerSlotProps } from '../DesktopDateRangePicker';
|
|
2
|
+
import { MobileDateRangePickerProps, MobileDateRangePickerSlots, MobileDateRangePickerSlotProps } from '../MobileDateRangePicker';
|
|
3
|
+
export interface DateRangePickerSlots<TDate> extends DesktopDateRangePickerSlots<TDate>, MobileDateRangePickerSlots<TDate> {
|
|
4
4
|
}
|
|
5
|
-
export interface
|
|
5
|
+
export interface DateRangePickerSlotProps<TDate> extends DesktopDateRangePickerSlotProps<TDate>, MobileDateRangePickerSlotProps<TDate> {
|
|
6
6
|
}
|
|
7
7
|
export interface DateRangePickerProps<TDate> extends DesktopDateRangePickerProps<TDate>, MobileDateRangePickerProps<TDate> {
|
|
8
8
|
/**
|
|
@@ -15,10 +15,10 @@ export interface DateRangePickerProps<TDate> extends DesktopDateRangePickerProps
|
|
|
15
15
|
* Overridable component slots.
|
|
16
16
|
* @default {}
|
|
17
17
|
*/
|
|
18
|
-
slots?:
|
|
18
|
+
slots?: DateRangePickerSlots<TDate>;
|
|
19
19
|
/**
|
|
20
20
|
* The props used for each component slot.
|
|
21
21
|
* @default {}
|
|
22
22
|
*/
|
|
23
|
-
slotProps?:
|
|
23
|
+
slotProps?: DateRangePickerSlotProps<TDate>;
|
|
24
24
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { DateRangePicker } from './DateRangePicker';
|
|
2
|
-
export type { DateRangePickerProps,
|
|
2
|
+
export type { DateRangePickerProps, DateRangePickerSlots, DateRangePickerSlotProps, } from './DateRangePicker.types';
|
|
3
3
|
export { DateRangePickerToolbar } from './DateRangePickerToolbar';
|
|
4
4
|
export type { DateRangePickerToolbarProps } from './DateRangePickerToolbar';
|
|
5
5
|
export { getDateRangePickerToolbarUtilityClass, dateRangePickerToolbarClasses, } from './dateRangePickerToolbarClasses';
|
|
@@ -3,17 +3,17 @@ import { LocalizedComponent } from '@mui/x-date-pickers/locales';
|
|
|
3
3
|
import { DefaultizedProps, BaseDateValidationProps, BasePickerInputProps, PickerViewRendererLookup } from '@mui/x-date-pickers/internals';
|
|
4
4
|
import { DateRangeValidationError } from '../models';
|
|
5
5
|
import { DateRange } from '../internals/models';
|
|
6
|
-
import {
|
|
6
|
+
import { DateRangeCalendarSlots, DateRangeCalendarSlotProps, ExportedDateRangeCalendarProps } from '../DateRangeCalendar';
|
|
7
7
|
import { DateRangePickerToolbarProps, ExportedDateRangePickerToolbarProps } from './DateRangePickerToolbar';
|
|
8
8
|
import { DateRangeViewRendererProps } from '../dateRangeViewRenderers';
|
|
9
|
-
export interface
|
|
9
|
+
export interface BaseDateRangePickerSlots<TDate> extends DateRangeCalendarSlots<TDate> {
|
|
10
10
|
/**
|
|
11
11
|
* Custom component for the toolbar rendered above the views.
|
|
12
12
|
* @default DateTimePickerToolbar
|
|
13
13
|
*/
|
|
14
14
|
toolbar?: React.JSXElementConstructor<DateRangePickerToolbarProps<TDate>>;
|
|
15
15
|
}
|
|
16
|
-
export interface
|
|
16
|
+
export interface BaseDateRangePickerSlotProps<TDate> extends DateRangeCalendarSlotProps<TDate> {
|
|
17
17
|
toolbar?: ExportedDateRangePickerToolbarProps;
|
|
18
18
|
}
|
|
19
19
|
export interface BaseDateRangePickerProps<TDate> extends Omit<BasePickerInputProps<DateRange<TDate>, TDate, 'day', DateRangeValidationError>, 'view' | 'views' | 'openTo' | 'onViewChange' | 'orientation'>, ExportedDateRangeCalendarProps<TDate>, BaseDateValidationProps<TDate> {
|
|
@@ -21,12 +21,12 @@ export interface BaseDateRangePickerProps<TDate> extends Omit<BasePickerInputPro
|
|
|
21
21
|
* Overridable component slots.
|
|
22
22
|
* @default {}
|
|
23
23
|
*/
|
|
24
|
-
slots?:
|
|
24
|
+
slots?: BaseDateRangePickerSlots<TDate>;
|
|
25
25
|
/**
|
|
26
26
|
* The props used for each component slot.
|
|
27
27
|
* @default {}
|
|
28
28
|
*/
|
|
29
|
-
slotProps?:
|
|
29
|
+
slotProps?: BaseDateRangePickerSlotProps<TDate>;
|
|
30
30
|
/**
|
|
31
31
|
* Define custom view renderers for each section.
|
|
32
32
|
* If `null`, the section will only have field editing.
|
|
@@ -191,6 +191,11 @@ DesktopDateRangePicker.propTypes = {
|
|
|
191
191
|
* Minimal selectable date.
|
|
192
192
|
*/
|
|
193
193
|
minDate: PropTypes.any,
|
|
194
|
+
/**
|
|
195
|
+
* Name attribute used by the `input` element in the Field.
|
|
196
|
+
* Ignored if the field has several inputs.
|
|
197
|
+
*/
|
|
198
|
+
name: PropTypes.string,
|
|
194
199
|
/**
|
|
195
200
|
* Callback fired when the value is accepted.
|
|
196
201
|
* @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value.
|
|
@@ -277,7 +282,7 @@ DesktopDateRangePicker.propTypes = {
|
|
|
277
282
|
* 4. If `null` is provided, no section will be selected
|
|
278
283
|
* If not provided, the selected sections will be handled internally.
|
|
279
284
|
*/
|
|
280
|
-
selectedSections: PropTypes.oneOfType([PropTypes.oneOf(['all', 'day', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'weekDay', 'year']), PropTypes.number, PropTypes.shape({
|
|
285
|
+
selectedSections: PropTypes.oneOfType([PropTypes.oneOf(['all', 'day', 'empty', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'weekDay', 'year']), PropTypes.number, PropTypes.shape({
|
|
281
286
|
endIndex: PropTypes.number.isRequired,
|
|
282
287
|
startIndex: PropTypes.number.isRequired
|
|
283
288
|
})]),
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { MakeOptional } from '@mui/x-date-pickers/internals';
|
|
2
|
-
import {
|
|
3
|
-
import { BaseDateRangePickerProps,
|
|
4
|
-
export interface
|
|
2
|
+
import { UseDesktopRangePickerSlots, UseDesktopRangePickerSlotProps, DesktopRangeOnlyPickerProps } from '../internals/hooks/useDesktopRangePicker';
|
|
3
|
+
import { BaseDateRangePickerProps, BaseDateRangePickerSlots, BaseDateRangePickerSlotProps } from '../DateRangePicker/shared';
|
|
4
|
+
export interface DesktopDateRangePickerSlots<TDate> extends BaseDateRangePickerSlots<TDate>, MakeOptional<UseDesktopRangePickerSlots<TDate, 'day'>, 'field'> {
|
|
5
5
|
}
|
|
6
|
-
export interface
|
|
6
|
+
export interface DesktopDateRangePickerSlotProps<TDate> extends BaseDateRangePickerSlotProps<TDate>, UseDesktopRangePickerSlotProps<TDate, 'day'> {
|
|
7
7
|
}
|
|
8
8
|
export interface DesktopDateRangePickerProps<TDate> extends BaseDateRangePickerProps<TDate>, DesktopRangeOnlyPickerProps<TDate> {
|
|
9
9
|
/**
|
|
@@ -15,10 +15,10 @@ export interface DesktopDateRangePickerProps<TDate> extends BaseDateRangePickerP
|
|
|
15
15
|
* Overridable component slots.
|
|
16
16
|
* @default {}
|
|
17
17
|
*/
|
|
18
|
-
slots?:
|
|
18
|
+
slots?: DesktopDateRangePickerSlots<TDate>;
|
|
19
19
|
/**
|
|
20
20
|
* The props used for each component slot.
|
|
21
21
|
* @default {}
|
|
22
22
|
*/
|
|
23
|
-
slotProps?:
|
|
23
|
+
slotProps?: DesktopDateRangePickerSlotProps<TDate>;
|
|
24
24
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { DesktopDateRangePicker } from './DesktopDateRangePicker';
|
|
2
|
-
export type { DesktopDateRangePickerProps,
|
|
2
|
+
export type { DesktopDateRangePickerProps, DesktopDateRangePickerSlots, DesktopDateRangePickerSlotProps, } from './DesktopDateRangePicker.types';
|
|
@@ -191,6 +191,11 @@ MobileDateRangePicker.propTypes = {
|
|
|
191
191
|
* Minimal selectable date.
|
|
192
192
|
*/
|
|
193
193
|
minDate: PropTypes.any,
|
|
194
|
+
/**
|
|
195
|
+
* Name attribute used by the `input` element in the Field.
|
|
196
|
+
* Ignored if the field has several inputs.
|
|
197
|
+
*/
|
|
198
|
+
name: PropTypes.string,
|
|
194
199
|
/**
|
|
195
200
|
* Callback fired when the value is accepted.
|
|
196
201
|
* @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value.
|
|
@@ -277,7 +282,7 @@ MobileDateRangePicker.propTypes = {
|
|
|
277
282
|
* 4. If `null` is provided, no section will be selected
|
|
278
283
|
* If not provided, the selected sections will be handled internally.
|
|
279
284
|
*/
|
|
280
|
-
selectedSections: PropTypes.oneOfType([PropTypes.oneOf(['all', 'day', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'weekDay', 'year']), PropTypes.number, PropTypes.shape({
|
|
285
|
+
selectedSections: PropTypes.oneOfType([PropTypes.oneOf(['all', 'day', 'empty', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'weekDay', 'year']), PropTypes.number, PropTypes.shape({
|
|
281
286
|
endIndex: PropTypes.number.isRequired,
|
|
282
287
|
startIndex: PropTypes.number.isRequired
|
|
283
288
|
})]),
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { MakeOptional } from '@mui/x-date-pickers/internals';
|
|
2
|
-
import {
|
|
3
|
-
import { BaseDateRangePickerProps,
|
|
4
|
-
export interface
|
|
2
|
+
import { UseMobileRangePickerSlots, UseMobileRangePickerSlotProps, MobileRangeOnlyPickerProps } from '../internals/hooks/useMobileRangePicker';
|
|
3
|
+
import { BaseDateRangePickerProps, BaseDateRangePickerSlots, BaseDateRangePickerSlotProps } from '../DateRangePicker/shared';
|
|
4
|
+
export interface MobileDateRangePickerSlots<TDate> extends BaseDateRangePickerSlots<TDate>, MakeOptional<UseMobileRangePickerSlots<TDate, 'day'>, 'field'> {
|
|
5
5
|
}
|
|
6
|
-
export interface
|
|
6
|
+
export interface MobileDateRangePickerSlotProps<TDate> extends BaseDateRangePickerSlotProps<TDate>, UseMobileRangePickerSlotProps<TDate, 'day'> {
|
|
7
7
|
}
|
|
8
8
|
export interface MobileDateRangePickerProps<TDate> extends BaseDateRangePickerProps<TDate>, MobileRangeOnlyPickerProps<TDate> {
|
|
9
9
|
/**
|
|
@@ -15,10 +15,10 @@ export interface MobileDateRangePickerProps<TDate> extends BaseDateRangePickerPr
|
|
|
15
15
|
* Overridable component slots.
|
|
16
16
|
* @default {}
|
|
17
17
|
*/
|
|
18
|
-
slots?:
|
|
18
|
+
slots?: MobileDateRangePickerSlots<TDate>;
|
|
19
19
|
/**
|
|
20
20
|
* The props used for each component slot.
|
|
21
21
|
* @default {}
|
|
22
22
|
*/
|
|
23
|
-
slotProps?:
|
|
23
|
+
slotProps?: MobileDateRangePickerSlotProps<TDate>;
|
|
24
24
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { MobileDateRangePicker } from './MobileDateRangePicker';
|
|
2
|
-
export type { MobileDateRangePickerProps,
|
|
2
|
+
export type { MobileDateRangePickerProps, MobileDateRangePickerSlots, MobileDateRangePickerSlotProps, } from './MobileDateRangePicker.types';
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
-
const _excluded = ["slots", "slotProps", "disabled", "autoFocus", "unstableStartFieldRef", "unstableEndFieldRef", "className"]
|
|
4
|
-
_excluded2 = ["onKeyDown", "ref", "readOnly", "inputMode"],
|
|
5
|
-
_excluded3 = ["onKeyDown", "ref", "readOnly", "inputMode"];
|
|
3
|
+
const _excluded = ["slots", "slotProps", "disabled", "autoFocus", "unstableStartFieldRef", "unstableEndFieldRef", "className"];
|
|
6
4
|
import * as React from 'react';
|
|
7
5
|
import PropTypes from 'prop-types';
|
|
8
6
|
import clsx from 'clsx';
|
|
@@ -12,7 +10,7 @@ import Typography from '@mui/material/Typography';
|
|
|
12
10
|
import { styled, useThemeProps } from '@mui/material/styles';
|
|
13
11
|
import { useSlotProps } from '@mui/base/utils';
|
|
14
12
|
import { unstable_composeClasses as composeClasses, unstable_generateUtilityClass as generateUtilityClass, unstable_generateUtilityClasses as generateUtilityClasses } from '@mui/utils';
|
|
15
|
-
import { splitFieldInternalAndForwardedProps } from '@mui/x-date-pickers/internals';
|
|
13
|
+
import { splitFieldInternalAndForwardedProps, convertFieldResponseIntoMuiTextFieldProps } from '@mui/x-date-pickers/internals';
|
|
16
14
|
import { useMultiInputDateRangeField } from '../internals/hooks/useMultiInputRangeField/useMultiInputDateRangeField';
|
|
17
15
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
18
16
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -116,58 +114,23 @@ const MultiInputDateRangeField = /*#__PURE__*/React.forwardRef(function MultiInp
|
|
|
116
114
|
ownerState,
|
|
117
115
|
className: classes.separator
|
|
118
116
|
});
|
|
119
|
-
const
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
}),
|
|
123
|
-
startTextFieldProps,
|
|
124
|
-
endTextFieldProps,
|
|
125
|
-
unstableStartFieldRef,
|
|
126
|
-
unstableEndFieldRef,
|
|
127
|
-
startInputRef: startTextFieldProps.inputRef,
|
|
128
|
-
endInputRef: endTextFieldProps.inputRef
|
|
117
|
+
const fieldResponse = useMultiInputDateRangeField({
|
|
118
|
+
sharedProps: _extends({}, dateFieldInternalProps, {
|
|
119
|
+
disabled
|
|
129
120
|
}),
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
endDate: {
|
|
138
|
-
onKeyDown: onEndInputKeyDown,
|
|
139
|
-
ref: endInputRef,
|
|
140
|
-
readOnly: endReadOnly,
|
|
141
|
-
inputMode: endInputMode
|
|
142
|
-
}
|
|
143
|
-
} = _useMultiInputDateRan,
|
|
144
|
-
startDateProps = _objectWithoutPropertiesLoose(_useMultiInputDateRan.startDate, _excluded3),
|
|
145
|
-
endDateProps = _objectWithoutPropertiesLoose(_useMultiInputDateRan.endDate, _excluded2);
|
|
121
|
+
startTextFieldProps,
|
|
122
|
+
endTextFieldProps,
|
|
123
|
+
unstableStartFieldRef,
|
|
124
|
+
unstableEndFieldRef
|
|
125
|
+
});
|
|
126
|
+
const startDateProps = convertFieldResponseIntoMuiTextFieldProps(fieldResponse.startDate);
|
|
127
|
+
const endDateProps = convertFieldResponseIntoMuiTextFieldProps(fieldResponse.endDate);
|
|
146
128
|
return /*#__PURE__*/_jsxs(Root, _extends({}, rootProps, {
|
|
147
129
|
children: [/*#__PURE__*/_jsx(TextField, _extends({
|
|
148
130
|
fullWidth: true
|
|
149
|
-
}, startDateProps, {
|
|
150
|
-
InputProps: _extends({}, startDateProps.InputProps, {
|
|
151
|
-
readOnly: startReadOnly
|
|
152
|
-
}),
|
|
153
|
-
inputProps: _extends({}, startDateProps.inputProps, {
|
|
154
|
-
ref: startInputRef,
|
|
155
|
-
inputMode: startInputMode,
|
|
156
|
-
onKeyDown: onStartInputKeyDown
|
|
157
|
-
})
|
|
158
|
-
})), /*#__PURE__*/_jsx(Separator, _extends({}, separatorProps)), /*#__PURE__*/_jsx(TextField, _extends({
|
|
131
|
+
}, startDateProps)), /*#__PURE__*/_jsx(Separator, _extends({}, separatorProps)), /*#__PURE__*/_jsx(TextField, _extends({
|
|
159
132
|
fullWidth: true
|
|
160
|
-
}, endDateProps
|
|
161
|
-
InputProps: _extends({}, endDateProps.InputProps, {
|
|
162
|
-
readOnly: endReadOnly
|
|
163
|
-
}),
|
|
164
|
-
inputProps: _extends({}, endDateProps.inputProps, {
|
|
165
|
-
ref: endInputRef,
|
|
166
|
-
readOnly: endReadOnly,
|
|
167
|
-
inputMode: endInputMode,
|
|
168
|
-
onKeyDown: onEndInputKeyDown
|
|
169
|
-
})
|
|
170
|
-
}))]
|
|
133
|
+
}, endDateProps))]
|
|
171
134
|
}));
|
|
172
135
|
});
|
|
173
136
|
process.env.NODE_ENV !== "production" ? MultiInputDateRangeField.propTypes = {
|
|
@@ -271,7 +234,7 @@ process.env.NODE_ENV !== "production" ? MultiInputDateRangeField.propTypes = {
|
|
|
271
234
|
* 4. If `null` is provided, no section will be selected
|
|
272
235
|
* If not provided, the selected sections will be handled internally.
|
|
273
236
|
*/
|
|
274
|
-
selectedSections: PropTypes.oneOfType([PropTypes.oneOf(['all', 'day', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'weekDay', 'year']), PropTypes.number, PropTypes.shape({
|
|
237
|
+
selectedSections: PropTypes.oneOfType([PropTypes.oneOf(['all', 'day', 'empty', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'weekDay', 'year']), PropTypes.number, PropTypes.shape({
|
|
275
238
|
endIndex: PropTypes.number.isRequired,
|
|
276
239
|
startIndex: PropTypes.number.isRequired
|
|
277
240
|
})]),
|