@mui/x-date-pickers-pro 7.0.0-alpha.4 → 7.0.0-alpha.6
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 +342 -0
- package/DateRangeCalendar/DateRangeCalendar.js +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,257 @@
|
|
|
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.6
|
|
7
|
+
|
|
8
|
+
_Dec 22, 2023_
|
|
9
|
+
|
|
10
|
+
We'd like to offer a big thanks to the 6 contributors who made this release possible. Here are some highlights ✨:
|
|
11
|
+
|
|
12
|
+
- 🎁 Data Grid now supports `Date` objects in the `filterModel`
|
|
13
|
+
- 🌍 Improve Russian (ru-RU) locale on the Data Grid
|
|
14
|
+
- 🐞 Bugfixes
|
|
15
|
+
|
|
16
|
+
### Data Grid
|
|
17
|
+
|
|
18
|
+
#### Breaking changes
|
|
19
|
+
|
|
20
|
+
- The filter panel no longer uses the native version of the [`Select`](https://mui.com/material-ui/react-select/) component for all components.
|
|
21
|
+
- The `getOptionValue` and `getOptionLabel` props were removed from the following components:
|
|
22
|
+
|
|
23
|
+
- `GridEditSingleSelectCell`
|
|
24
|
+
- `GridFilterInputSingleSelect`
|
|
25
|
+
- `GridFilterInputMultipleSingleSelect`
|
|
26
|
+
|
|
27
|
+
Use the `getOptionValue` and `getOptionLabel` properties on the `singleSelect` column definition instead:
|
|
28
|
+
|
|
29
|
+
```tsx
|
|
30
|
+
const column: GridColDef = {
|
|
31
|
+
type: 'singleSelect',
|
|
32
|
+
field: 'country',
|
|
33
|
+
valueOptions: [
|
|
34
|
+
{ code: 'BR', name: 'Brazil' },
|
|
35
|
+
{ code: 'FR', name: 'France' },
|
|
36
|
+
],
|
|
37
|
+
getOptionValue: (value: any) => value.code,
|
|
38
|
+
getOptionLabel: (value: any) => value.name,
|
|
39
|
+
};
|
|
40
|
+
```
|
|
41
|
+
- The `filterModel` now supports `Date` objects as values for `date` and `dateTime` column types.
|
|
42
|
+
The `filterModel` still accepts strings as values for `date` and `dateTime` column types,
|
|
43
|
+
but all updates to the `filterModel` coming from the UI (e.g. filter panel) will set the value as a `Date` object.
|
|
44
|
+
|
|
45
|
+
#### `@mui/x-data-grid@7.0.0-alpha.6`
|
|
46
|
+
|
|
47
|
+
- [DataGrid] Fix typos in the JSDoc (#11451) @flaviendelangle
|
|
48
|
+
- [DataGrid] Make `checkboxSelection` respect the `disableMultipleRowSelection` prop (#11448) @cherniavskii
|
|
49
|
+
- [DataGrid] Support `Date` objects in filter model (#7069) @cherniavskii
|
|
50
|
+
- [DataGrid] Use non-native `Select`s by default (#11330) @cherniavskii
|
|
51
|
+
- [l10n] Improve Russian (ru-RU) locale (#11441) @wensiet
|
|
52
|
+
|
|
53
|
+
#### `@mui/x-data-grid-pro@7.0.0-alpha.6` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
54
|
+
|
|
55
|
+
Same changes as in `@mui/x-data-grid@7.0.0-alpha.6`.
|
|
56
|
+
|
|
57
|
+
#### `@mui/x-data-grid-premium@7.0.0-alpha.6` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
58
|
+
|
|
59
|
+
Same changes as in `@mui/x-data-grid-pro@7.0.0-alpha.6`.
|
|
60
|
+
|
|
61
|
+
### Date Pickers
|
|
62
|
+
|
|
63
|
+
#### `@mui/x-date-pickers@7.0.0-alpha.6`
|
|
64
|
+
|
|
65
|
+
- [fields] Adjust `PickersInput` sizing styles (#11392) @noraleonte
|
|
66
|
+
- [fields] Fix section pasting (#11447) @LukasTy
|
|
67
|
+
- [pickers] Add `PickersTextField` `standard` and `filled` variants (#11250) @noraleonte
|
|
68
|
+
- [pickers] Add missing breaking changes to changelog (#11420) @MBilalShafi
|
|
69
|
+
- [pickers] Cleanup error messages in `PickersSectionList` (#11449) @flaviendelangle
|
|
70
|
+
- [pickers] Create new component `PickersSectionList` (#11352) @flaviendelangle
|
|
71
|
+
|
|
72
|
+
#### `@mui/x-date-pickers-pro@7.0.0-alpha.6` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
73
|
+
|
|
74
|
+
Same changes as in `@mui/x-date-pickers@7.0.0-alpha.6`.
|
|
75
|
+
|
|
76
|
+
### Charts / `@mui/x-charts@7.0.0-alpha.6`
|
|
77
|
+
|
|
78
|
+
- [charts] Allow percentage values for pie chart center and radius (#11464) @alexfauquette
|
|
79
|
+
- [charts] Improve dataset typing (#11372) @alexfauquette
|
|
80
|
+
- [charts] Make error message more explicit (#11457) @alexfauquette
|
|
81
|
+
- [charts] Make the helper `ChartsText` component public (#11370) @alexfauquette
|
|
82
|
+
|
|
83
|
+
### Docs
|
|
84
|
+
|
|
85
|
+
- [docs] Document `false` default values for boolean props (#11477) @cherniavskii
|
|
86
|
+
- [docs] Improve Pickers `name` prop examples (#11422) @LukasTy
|
|
87
|
+
- [docs] Limit `date-fns` package to v2 in codesandbox (#11463) @LukasTy
|
|
88
|
+
|
|
89
|
+
### Core
|
|
90
|
+
|
|
91
|
+
- [core] Cherry pick follow up (#11469) @LukasTy
|
|
92
|
+
- [core] Fix `cherry-pick` action (#11446) @LukasTy
|
|
93
|
+
- [core] Fix security regressions in cherry-pick-next-to-master.yml (#11482) @MBilalShafi
|
|
94
|
+
- [test] Reload the page if its blank and there are no links to the remaining tests (#11466) @cherniavskii
|
|
95
|
+
|
|
96
|
+
## 7.0.0-alpha.5
|
|
97
|
+
|
|
98
|
+
_Dec 14, 2023_
|
|
99
|
+
|
|
100
|
+
We'd like to offer a big thanks to the 9 contributors who made this release possible. Here are some highlights ✨:
|
|
101
|
+
|
|
102
|
+
- 💫 New recipe added for the Data Grid
|
|
103
|
+
- 🌍 Improve Swedish (sv-SE) and Urdu (ur-PK) locales on the Data Grid
|
|
104
|
+
- 🐞 Bugfixes
|
|
105
|
+
|
|
106
|
+
### Data Grid
|
|
107
|
+
|
|
108
|
+
#### Breaking changes
|
|
109
|
+
|
|
110
|
+
- The `instanceId` prop is now required for state selectors.
|
|
111
|
+
This prop is used to distinguish between multiple Data Grid instances on the same page.
|
|
112
|
+
See [migration docs](https://next.mui.com/x/migration/migration-data-grid-v6/#instanceid-prop-is-required-for-state-selectors) for more details.
|
|
113
|
+
|
|
114
|
+
#### `@mui/x-data-grid@7.0.0-alpha.5`
|
|
115
|
+
|
|
116
|
+
- [DataGrid] Make `instanceId` required for state selectors (#11395) @cherniavskii
|
|
117
|
+
- [DataGrid] Recipe for grouped rows autosizing (#11401) @michelengelen
|
|
118
|
+
- [l10n] Improve Swedish (sv-SE) locale (#11373) @fredrikcarlbom
|
|
119
|
+
- [l10n] Improve Urdu (ur-PK) locale (#11400) @MBilalShafi
|
|
120
|
+
|
|
121
|
+
#### `@mui/x-data-grid-pro@7.0.0-alpha.5` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
122
|
+
|
|
123
|
+
Same changes as in `@mui/x-data-grid@7.0.0-alpha.5`.
|
|
124
|
+
|
|
125
|
+
#### `@mui/x-data-grid-premium@7.0.0-alpha.5` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
126
|
+
|
|
127
|
+
Same changes as in `@mui/x-data-grid-pro@7.0.0-alpha.5`.
|
|
128
|
+
|
|
129
|
+
### Date Pickers
|
|
130
|
+
|
|
131
|
+
#### Breaking changes
|
|
132
|
+
|
|
133
|
+
- The slot interfaces got renamed to match with `@mui/base` naming.
|
|
134
|
+
The `SlotsComponent` suffix has been replaced with `Slots` and `SlotsComponentsProps` with `SlotProps`.
|
|
135
|
+
|
|
136
|
+
```diff
|
|
137
|
+
- DateCalendarSlotsComponent
|
|
138
|
+
+ DateCalendarSlots
|
|
139
|
+
- DateCalendarSlotsComponentsProps
|
|
140
|
+
+ DateCalendarSlotProps
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
- Move `inputRef` inside the props passed to the field hooks
|
|
144
|
+
|
|
145
|
+
The field hooks now only receive the props instead of an object containing both the props and the `inputRef`.
|
|
146
|
+
|
|
147
|
+
```diff
|
|
148
|
+
- const { inputRef, ...otherProps } = props
|
|
149
|
+
- const fieldResponse = useDateField({ props: otherProps, inputRef });
|
|
150
|
+
+ const fieldResponse = useDateField(props);
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
If you are using a multi input range field hook, the same applies to `startInputRef` and `endInputRef` params
|
|
154
|
+
|
|
155
|
+
```diff
|
|
156
|
+
- const { inputRef: startInputRef, ...otherStartTextFieldProps } = startTextFieldProps
|
|
157
|
+
- const { inputRef: endInputRef, ...otherEndTextFieldProps } = endTextFieldProps
|
|
158
|
+
|
|
159
|
+
const fieldResponse = useMultiInputDateRangeField({
|
|
160
|
+
sharedProps,
|
|
161
|
+
- startTextFieldProps: otherStartTextFieldProps,
|
|
162
|
+
- endTextFieldProps: otherEndTextFieldProps,
|
|
163
|
+
- startInputRef
|
|
164
|
+
- endInputRef,
|
|
165
|
+
+ startTextFieldProps,
|
|
166
|
+
+ endTextFieldProps
|
|
167
|
+
});
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
- Rename the ref returned by the field hooks to `inputRef`
|
|
171
|
+
|
|
172
|
+
When used with the v6 TextField approach (where the input is an `<input />` HTML element), the field hooks return a ref that needs to be passed to the `<input />` element.
|
|
173
|
+
This ref was previously named `ref` and has been renamed `inputRef` for extra clarity.
|
|
174
|
+
|
|
175
|
+
```diff
|
|
176
|
+
const fieldResponse = useDateField(props);
|
|
177
|
+
|
|
178
|
+
- return <input ref={fieldResponse.ref} />
|
|
179
|
+
+ return <input ref={fieldResponse.inputRef} />
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
If you are using a multi input range field hook, the same applies to the ref in the `startDate` and `endDate` objects
|
|
183
|
+
|
|
184
|
+
```diff
|
|
185
|
+
const fieldResponse = useDateField(props);
|
|
186
|
+
|
|
187
|
+
return (
|
|
188
|
+
<div>
|
|
189
|
+
- <input ref={fieldResponse.startDate.ref} />
|
|
190
|
+
+ <input ref={fieldResponse.startDate.inputRef} />
|
|
191
|
+
<span>–</span>
|
|
192
|
+
- <input ref={fieldResponse.endDate.ref} />
|
|
193
|
+
+ <input ref={fieldResponse.endDate.inputRef} />
|
|
194
|
+
</div>
|
|
195
|
+
)
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
- Restructure the API of `useClearableField`
|
|
199
|
+
|
|
200
|
+
The `useClearableField` hook API has been simplified to now take a `props` parameter instead of a `fieldProps`, `InputProps`, `clearable`, `onClear`, `slots` and `slotProps` parameters.
|
|
201
|
+
|
|
202
|
+
You should now be able to directly pass the returned value from your field hook (e.g: `useDateField`) to `useClearableField`
|
|
203
|
+
|
|
204
|
+
```diff
|
|
205
|
+
const fieldResponse = useDateField(props);
|
|
206
|
+
|
|
207
|
+
- const { InputProps, onClear, clearable, slots, slotProps, ...otherFieldProps } = fieldResponse
|
|
208
|
+
- const { InputProps: ProcessedInputProps, fieldProps: processedFieldProps } = useClearableField({
|
|
209
|
+
- fieldProps: otherFieldProps,
|
|
210
|
+
- InputProps,
|
|
211
|
+
- clearable,
|
|
212
|
+
- onClear,
|
|
213
|
+
- slots,
|
|
214
|
+
- slotProps,
|
|
215
|
+
- });
|
|
216
|
+
-
|
|
217
|
+
- return <MyCustomTextField {...processedFieldProps} InputProps={ProcessedInputProps} />
|
|
218
|
+
|
|
219
|
+
+ const processedFieldProps = useClearableField(fieldResponse);
|
|
220
|
+
+
|
|
221
|
+
+ return <MyCustomTextField {...processedFieldProps} />
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
#### `@mui/x-date-pickers@7.0.0-alpha.5`
|
|
225
|
+
|
|
226
|
+
- [fields] Support empty sections (#10307) @flaviendelangle
|
|
227
|
+
- [pickers] Fix field types to avoid error on latest `@types/react` version (#11397) @LukasTy
|
|
228
|
+
- [pickers] Remove all relative imports to the internals index file (#11375) @flaviendelangle
|
|
229
|
+
- [pickers] Rename slots interfaces (#11339) @alexfauquette
|
|
230
|
+
- [pickers] Simplify the API of the field hooks (#11371) @flaviendelangle
|
|
231
|
+
- [pickers] Support name prop (#11025) @gitstart
|
|
232
|
+
|
|
233
|
+
#### `@mui/x-date-pickers-pro@7.0.0-alpha.5` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
234
|
+
|
|
235
|
+
Same changes as in `@mui/x-date-pickers@7.0.0-alpha.5`, plus:
|
|
236
|
+
|
|
237
|
+
- [DateRangePicker] Fix `autoFocus` behavior (#11273) @kealjones-wk
|
|
238
|
+
|
|
239
|
+
### Charts / `@mui/x-charts@7.0.0-alpha.5`
|
|
240
|
+
|
|
241
|
+
- [charts] Fix size overflow (#11385) @alexfauquette
|
|
242
|
+
|
|
243
|
+
### `@mui/x-codemod@7.0.0-alpha.5`
|
|
244
|
+
|
|
245
|
+
- [codemod] Add `cellSelection` codemod and update migration guide (#11353) @MBilalShafi
|
|
246
|
+
|
|
247
|
+
### Docs
|
|
248
|
+
|
|
249
|
+
- [docs] Respect GoT books (@janoma) (#11387) @alexfauquette
|
|
250
|
+
|
|
251
|
+
### Core
|
|
252
|
+
|
|
253
|
+
- [core] Automate cherry-pick of PRs from `next` -> `master` (#11382) @MBilalShafi
|
|
254
|
+
- [github] Update `no-response` workflow (#11369) @MBilalShafi
|
|
255
|
+
- [test] Fix flaky screenshots (#11388) @cherniavskii
|
|
256
|
+
|
|
6
257
|
## 7.0.0-alpha.4
|
|
7
258
|
|
|
8
259
|
_Dec 8, 2023_
|
|
@@ -949,6 +1200,97 @@ Here is an example of the renaming for the `<ChartsTooltip />` component.
|
|
|
949
1200
|
- [core] Update release instructions as per v7 configuration (#10962) @MBilalShafi
|
|
950
1201
|
- [license] Correctly throw errors (#10924) @oliviertassinari
|
|
951
1202
|
|
|
1203
|
+
## 6.18.6
|
|
1204
|
+
|
|
1205
|
+
_Dec 22, 2023_
|
|
1206
|
+
|
|
1207
|
+
We'd like to offer a big thanks to the 5 contributors who made this release possible. Here are some highlights ✨:
|
|
1208
|
+
|
|
1209
|
+
- 🌍 Improve Russian (ru-RU) locale (#11429) @wensiet
|
|
1210
|
+
- 🐞 Bugfixes
|
|
1211
|
+
|
|
1212
|
+
### Data Grid
|
|
1213
|
+
|
|
1214
|
+
#### `@mui/x-data-grid@6.18.6`
|
|
1215
|
+
|
|
1216
|
+
- [DataGrid] Fix typos in the JSDoc (#11475) @flaviendelangle
|
|
1217
|
+
- [l10n] Improve Russian (ru-RU) locale (#11429) @wensiet
|
|
1218
|
+
|
|
1219
|
+
#### `@mui/x-data-grid-pro@6.18.6` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
1220
|
+
|
|
1221
|
+
Same changes as in `@mui/x-data-grid@6.18.6`.
|
|
1222
|
+
|
|
1223
|
+
#### `@mui/x-data-grid-premium@6.18.6` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
1224
|
+
|
|
1225
|
+
Same changes as in `@mui/x-data-grid-pro@6.18.6`.
|
|
1226
|
+
|
|
1227
|
+
### Date Pickers
|
|
1228
|
+
|
|
1229
|
+
#### `@mui/x-date-pickers@6.18.6`
|
|
1230
|
+
|
|
1231
|
+
- [fields] Fix section pasting (#11467) @LukasTy
|
|
1232
|
+
|
|
1233
|
+
#### `@mui/x-date-pickers-pro@6.18.6` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
1234
|
+
|
|
1235
|
+
Same changes as in `@mui/x-date-pickers@6.18.6`.
|
|
1236
|
+
|
|
1237
|
+
### Charts / `@mui/x-charts@6.18.6`
|
|
1238
|
+
|
|
1239
|
+
- [charts] Allow percentage values for pie chart center and radius (#11464) @alexfauquette
|
|
1240
|
+
- [charts] Make error message more explicit (#11457) @alexfauquette
|
|
1241
|
+
- [charts] Make the helper `ChartsText` component public (#11370) @alexfauquette
|
|
1242
|
+
- [charts] Improve dataset typing (#11372) @alexfauquette
|
|
1243
|
+
- [charts] Fix size overflow (#11385) @alexfauquette
|
|
1244
|
+
|
|
1245
|
+
### Docs
|
|
1246
|
+
|
|
1247
|
+
- [docs] Document false default values for boolean props (#11489) @cherniavskii
|
|
1248
|
+
- [docs] Improve Pickers `name` prop examples (#11442) @LukasTy
|
|
1249
|
+
- [docs] Limit `date-fns` package to v2 in codesandbox (#11478) @LukasTy
|
|
1250
|
+
- [test] Reload the page if its blank and there are no links to the remaining tests (#11471) @cherniavskii
|
|
1251
|
+
|
|
1252
|
+
## 6.18.5
|
|
1253
|
+
|
|
1254
|
+
_Dec 14, 2023_
|
|
1255
|
+
|
|
1256
|
+
We'd like to offer a big thanks to the 7 contributors who made this release possible. Here are some highlights ✨:
|
|
1257
|
+
|
|
1258
|
+
- 🌍 Improve Swedish (sv-SE) and Urdu (ur-PK) locales on the Data Grid
|
|
1259
|
+
- 🐞 Bugfixes
|
|
1260
|
+
|
|
1261
|
+
### Data Grid
|
|
1262
|
+
|
|
1263
|
+
#### `@mui/x-data-grid@6.18.5`
|
|
1264
|
+
|
|
1265
|
+
- [l10n] Improve Swedish (sv-SE) locale (#11379) @fredrikcarlbom
|
|
1266
|
+
- [l10n] Improve Urdu (ur-PK) locale for data grid (#11409) @MBilalShafi
|
|
1267
|
+
|
|
1268
|
+
#### `@mui/x-data-grid-pro@6.18.5` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
1269
|
+
|
|
1270
|
+
Same changes as in `@mui/x-data-grid@6.18.5`.
|
|
1271
|
+
|
|
1272
|
+
#### `@mui/x-data-grid-premium@6.18.5` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
1273
|
+
|
|
1274
|
+
Same changes as in `@mui/x-data-grid-pro@6.18.5`.
|
|
1275
|
+
|
|
1276
|
+
### Date Pickers
|
|
1277
|
+
|
|
1278
|
+
#### `@mui/x-date-pickers@6.18.5`
|
|
1279
|
+
|
|
1280
|
+
- [pickers] Fix field types to avoid error on latest `@types/react` version (#11398) @LukasTy
|
|
1281
|
+
- [pickers] Support name prop (#11380) @gitstart
|
|
1282
|
+
|
|
1283
|
+
#### `@mui/x-date-pickers-pro@6.18.5` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
1284
|
+
|
|
1285
|
+
Same changes as in `@mui/x-date-pickers@6.18.5`, plus:
|
|
1286
|
+
|
|
1287
|
+
- [DateRangePicker] Fix `autoFocus` behavior (#11376) @kealjones-wk
|
|
1288
|
+
|
|
1289
|
+
### Docs
|
|
1290
|
+
|
|
1291
|
+
- [docs] Respect GoT books (#11294) @janoma
|
|
1292
|
+
- [test] Fix flaky screenshots (#11391) @cherniavskii
|
|
1293
|
+
|
|
952
1294
|
## 6.18.4
|
|
953
1295
|
|
|
954
1296
|
_Dec 8, 2023_
|
|
@@ -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';
|