Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 6dfb063

Browse files
committedFeb 19, 2025
[pickers] Make the single input field the default field on range pickers
1 parent e56a381 commit 6dfb063

File tree

70 files changed

+325
-302
lines changed

Some content is hidden

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

70 files changed

+325
-302
lines changed
 

‎docs/data/date-pickers/base-concepts/ComponentFamilies.tsx

+12-12
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ import { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider';
77
import { DateField } from '@mui/x-date-pickers/DateField';
88
import { TimeField } from '@mui/x-date-pickers/TimeField';
99
import { DateTimeField } from '@mui/x-date-pickers/DateTimeField';
10-
import { MultiInputDateRangeField } from '@mui/x-date-pickers-pro/MultiInputDateRangeField';
11-
import { MultiInputTimeRangeField } from '@mui/x-date-pickers-pro/MultiInputTimeRangeField';
12-
import { MultiInputDateTimeRangeField } from '@mui/x-date-pickers-pro/MultiInputDateTimeRangeField';
10+
import { SingleInputDateRangeField } from '@mui/x-date-pickers-pro/SingleInputDateRangeField';
11+
import { SingleInputTimeRangeField } from '@mui/x-date-pickers-pro/SingleInputTimeRangeField';
12+
import { SingleInputDateTimeRangeField } from '@mui/x-date-pickers-pro/SingleInputDateTimeRangeField';
1313
import Stack from '@mui/material/Stack';
1414
import Tooltip from '@mui/material/Tooltip';
1515

@@ -49,9 +49,9 @@ export default function ComponentFamilies() {
4949
'DateField',
5050
'TimeField',
5151
'DateTimeField',
52-
'MultiInputDateRangeField',
53-
'MultiInputTimeRangeField',
54-
'MultiInputDateTimeRangeField',
52+
'SingleInputDateRangeField',
53+
'SingleInputTimeRangeField',
54+
'SingleInputDateTimeRangeField',
5555
]}
5656
>
5757
<DemoItem label="Date">
@@ -65,25 +65,25 @@ export default function ComponentFamilies() {
6565
</DemoItem>
6666
<DemoItem
6767
label={<ProLabel>Date Range</ProLabel>}
68-
component="MultiInputDateRangeField"
68+
component="SingleInputDateRangeField"
6969
>
70-
<MultiInputDateRangeField
70+
<SingleInputDateRangeField
7171
defaultValue={[dayjs('2022-04-17'), dayjs('2022-04-21')]}
7272
/>
7373
</DemoItem>
7474
<DemoItem
7575
label={<ProLabel>Time Range</ProLabel>}
76-
component="MultiInputTimeRangeField"
76+
component="SingleInputTimeRangeField"
7777
>
78-
<MultiInputTimeRangeField
78+
<SingleInputTimeRangeField
7979
defaultValue={[dayjs('2022-04-17T15:30'), dayjs('2022-04-17T18:30')]}
8080
/>
8181
</DemoItem>
8282
<DemoItem
8383
label={<ProLabel>Date Time Range</ProLabel>}
84-
component="MultiInputDateTimeRangeField"
84+
component="SingleInputDateTimeRangeField"
8585
>
86-
<MultiInputDateTimeRangeField
86+
<SingleInputDateTimeRangeField
8787
defaultValue={[dayjs('2022-04-17T15:30'), dayjs('2022-04-21T18:30')]}
8888
/>
8989
</DemoItem>

‎docs/data/date-pickers/custom-field/BrowserV7MultiInputRangeField.js

+2
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,8 @@ function BrowserMultiInputDateRangeField(props) {
116116
);
117117
}
118118

119+
BrowserMultiInputDateRangeField.fieldType = 'multi-input';
120+
119121
function BrowserDateRangePicker(props) {
120122
return (
121123
<DateRangePicker

0 commit comments

Comments
 (0)
Please sign in to comment.