@mui/x-date-pickers-pro 5.0.0-beta.4 → 5.0.0-beta.7
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 +142 -0
- package/DateRangeField/DateRangeField.d.ts +7 -0
- package/DateRangeField/DateRangeField.interfaces.d.ts +11 -0
- package/DateRangeField/DateRangeField.interfaces.js +1 -0
- package/DateRangeField/DateRangeField.js +15 -0
- package/DateRangeField/DateRangeField.utils.d.ts +5 -0
- package/DateRangeField/DateRangeField.utils.js +15 -0
- package/DateRangeField/index.d.ts +3 -0
- package/DateRangeField/index.js +2 -0
- package/DateRangeField/package.json +6 -0
- package/DateRangeField/useDateRangeField.d.ts +7 -0
- package/DateRangeField/useDateRangeField.js +113 -0
- package/DateRangePicker/DateRangePicker.js +9 -4
- package/DateRangePicker/DateRangePickerToolbar.js +4 -2
- package/DateRangePicker/DateRangePickerView.d.ts +3 -3
- package/DateRangePicker/DateRangePickerViewDesktop.d.ts +2 -2
- package/DateRangePicker/DateRangePickerViewMobile.d.ts +2 -2
- package/DateRangePicker/shared.d.ts +4 -5
- package/DateRangePicker/shared.js +7 -5
- package/DateRangePickerDay/DateRangePickerDay.js +0 -1
- package/DesktopDateRangePicker/DesktopDateRangePicker.js +3 -1
- package/MultiInputDateRangeField/MultiInputDateRangeField.d.ts +7 -0
- package/MultiInputDateRangeField/MultiInputDateRangeField.interfaces.d.ts +5 -0
- package/MultiInputDateRangeField/MultiInputDateRangeField.interfaces.js +1 -0
- package/MultiInputDateRangeField/MultiInputDateRangeField.js +27 -0
- package/MultiInputDateRangeField/index.d.ts +1 -0
- package/MultiInputDateRangeField/index.js +1 -0
- package/MultiInputDateRangeField/package.json +6 -0
- package/MultiInputDateRangeField/useMultiInputDateRangeField.d.ts +6 -0
- package/MultiInputDateRangeField/useMultiInputDateRangeField.js +82 -0
- package/README.md +2 -1
- package/StaticDateRangePicker/StaticDateRangePicker.d.ts +2 -2
- package/index.js +1 -1
- package/internal/hooks/validation/useDateRangeValidation.d.ts +2 -2
- package/internal/utils/releaseInfo.js +1 -1
- package/legacy/DateRangeField/DateRangeField.interfaces.js +1 -0
- package/legacy/DateRangeField/DateRangeField.js +15 -0
- package/legacy/DateRangeField/DateRangeField.utils.js +15 -0
- package/legacy/DateRangeField/index.js +2 -0
- package/legacy/DateRangeField/useDateRangeField.js +127 -0
- package/legacy/DateRangePicker/DateRangePicker.js +9 -4
- package/legacy/DateRangePicker/DateRangePickerToolbar.js +4 -3
- package/legacy/DateRangePicker/shared.js +7 -5
- package/legacy/DateRangePickerDay/DateRangePickerDay.js +0 -1
- package/legacy/DesktopDateRangePicker/DesktopDateRangePicker.js +3 -1
- package/legacy/MultiInputDateRangeField/MultiInputDateRangeField.interfaces.js +1 -0
- package/legacy/MultiInputDateRangeField/MultiInputDateRangeField.js +27 -0
- package/legacy/MultiInputDateRangeField/index.js +1 -0
- package/legacy/MultiInputDateRangeField/useMultiInputDateRangeField.js +84 -0
- package/legacy/index.js +1 -1
- package/legacy/internal/utils/releaseInfo.js +1 -1
- package/modern/DateRangeField/DateRangeField.interfaces.js +1 -0
- package/modern/DateRangeField/DateRangeField.js +15 -0
- package/modern/DateRangeField/DateRangeField.utils.js +15 -0
- package/modern/DateRangeField/index.js +2 -0
- package/modern/DateRangeField/useDateRangeField.js +113 -0
- package/modern/DateRangePicker/DateRangePicker.js +9 -4
- package/modern/DateRangePicker/DateRangePickerToolbar.js +4 -2
- package/modern/DateRangePicker/shared.js +7 -5
- package/modern/DateRangePickerDay/DateRangePickerDay.js +0 -1
- package/modern/DesktopDateRangePicker/DesktopDateRangePicker.js +3 -1
- package/modern/MultiInputDateRangeField/MultiInputDateRangeField.interfaces.js +1 -0
- package/modern/MultiInputDateRangeField/MultiInputDateRangeField.js +27 -0
- package/modern/MultiInputDateRangeField/index.js +1 -0
- package/modern/MultiInputDateRangeField/useMultiInputDateRangeField.js +80 -0
- package/modern/index.js +1 -1
- package/modern/internal/utils/releaseInfo.js +1 -1
- package/node/DateRangeField/DateRangeField.interfaces.js +5 -0
- package/node/DateRangeField/DateRangeField.js +34 -0
- package/node/DateRangeField/DateRangeField.utils.js +24 -0
- package/node/DateRangeField/index.js +21 -0
- package/node/DateRangeField/useDateRangeField.js +134 -0
- package/node/DateRangePicker/DateRangePicker.js +10 -5
- package/node/DateRangePicker/DateRangePickerToolbar.js +3 -1
- package/node/DateRangePicker/shared.js +6 -4
- package/node/DateRangePickerDay/DateRangePickerDay.js +0 -1
- package/node/DesktopDateRangePicker/DesktopDateRangePicker.js +3 -1
- package/node/MultiInputDateRangeField/MultiInputDateRangeField.interfaces.js +5 -0
- package/node/MultiInputDateRangeField/MultiInputDateRangeField.js +47 -0
- package/node/MultiInputDateRangeField/index.js +13 -0
- package/node/MultiInputDateRangeField/useMultiInputDateRangeField.js +102 -0
- package/node/index.js +1 -1
- package/node/internal/utils/releaseInfo.js +1 -1
- package/package.json +11 -10
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,148 @@
|
|
|
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
|
+
## 5.16.0
|
|
7
|
+
|
|
8
|
+
_Aug 25, 2022_
|
|
9
|
+
|
|
10
|
+
We'd like to offer a big thanks to the 11 contributors who made this release possible. Here are some highlights ✨:
|
|
11
|
+
|
|
12
|
+
- 🎁 Introduce column grouping for data grid (#5133) @alexfauquette
|
|
13
|
+
|
|
14
|
+
You can now group columns using the `columnGroupingModel` prop. This lets you to display more structured data.
|
|
15
|
+
|
|
16
|
+
<img src="https://user-images.githubusercontent.com/45398769/186178366-4fba66b2-bf90-4c7a-9d83-940a7fc78704.png" width="800" />
|
|
17
|
+
|
|
18
|
+
To enable this feature, add `experimentalFeatures={{ columnGrouping: true }}`.
|
|
19
|
+
The grouping header can be fully customized.
|
|
20
|
+
See the [documentation](https://mui.com/x/react-data-grid/column-groups/) to explore everything it has to offer.
|
|
21
|
+
|
|
22
|
+
- 🐞 Bugfixes
|
|
23
|
+
- 🌏 New locales for pickers thanks to @tesseractjh and @drastus
|
|
24
|
+
|
|
25
|
+
### `@mui/x-data-grid@v5.16.0` / `@mui/x-data-grid-pro@v5.16.0` / `@mui/x-data-grid-premium@v5.16.0`
|
|
26
|
+
|
|
27
|
+
#### Changes
|
|
28
|
+
|
|
29
|
+
- [DataGrid] Implement column grouping (#5133) @alexfauquette
|
|
30
|
+
- [DataGrid] Handle `disableVirtualization` prop change (#5889) @cherniavskii
|
|
31
|
+
- [DataGrid] Improve `GridRowModel` typing (#5734) @cherniavskii
|
|
32
|
+
- [DataGrid] Update deprecation note for `GridColDef` `hide` property (#5886) @cherniavskii
|
|
33
|
+
|
|
34
|
+
### `@mui/x-date-pickers@v5.0.0-beta.7` / `@mui/x-date-pickers-pro@v5.0.0-beta.7`
|
|
35
|
+
|
|
36
|
+
#### Changes
|
|
37
|
+
|
|
38
|
+
- [DatePicker] Fix to pass down `className` prop provided on DatePicker to `renderInput` (#5471) @CruseCtrl
|
|
39
|
+
- [DatePicker] Improve `a11y` support (#5809) @LukasTy
|
|
40
|
+
- [pickers] Add `PaperContent` component slot (#5801) @LukasTy
|
|
41
|
+
- [pickers] Add a breaking change section in the migration guide (#5805) @alexfauquette
|
|
42
|
+
- [pickers] Add new translations to `localeText` (#5143) @alexfauquette
|
|
43
|
+
- [pickers] Document components slots (#4657) @flaviendelangle
|
|
44
|
+
- [pickers] Add new unstable field components (#5504) @flaviendelangle
|
|
45
|
+
- [pickers] Fallback to default `minDate` / `maxDate` when `null` value is passed (#5397) @flaviendelangle
|
|
46
|
+
- [l10n] Add Korean (ko-KR) locale (#5854) @tesseractjh
|
|
47
|
+
- [l10n] Add Polish (pl-PL) locale (#5833) @drastus
|
|
48
|
+
|
|
49
|
+
### Docs
|
|
50
|
+
|
|
51
|
+
- [docs] Fix typo in `migration from lab` (#5277) @chuckwired
|
|
52
|
+
- [docs] Use `dayjs` instead of `date-fns` in doc examples (#5481) @flaviendelangle
|
|
53
|
+
|
|
54
|
+
### Core
|
|
55
|
+
|
|
56
|
+
- [core] Clarify the scope of the license key used for tests and documentation (#5824) @oliviertassinari
|
|
57
|
+
- [core] Fix Typescript error on field hooks (#5892) @flaviendelangle
|
|
58
|
+
- [core] Memoize `columns` in `useDemoData` hook (#5848) @cherniavskii
|
|
59
|
+
- [core] Remove Firefox from the BrowserStack list (#5874) @DanailH
|
|
60
|
+
- [core] Small changes to the release script (#5840) @m4theushw
|
|
61
|
+
|
|
62
|
+
## 5.15.3
|
|
63
|
+
|
|
64
|
+
_Aug 18, 2022_
|
|
65
|
+
|
|
66
|
+
We'd like to offer a big thanks to the 9 contributors who made this release possible. Here are some highlights ✨:
|
|
67
|
+
|
|
68
|
+
- 📚 Documentation improvements
|
|
69
|
+
- 🐞 Bugfixes
|
|
70
|
+
|
|
71
|
+
### `@mui/x-data-grid@v5.15.3` / `@mui/x-data-grid-pro@v5.15.3` / `@mui/x-data-grid-premium@v5.15.3`
|
|
72
|
+
|
|
73
|
+
#### Changes
|
|
74
|
+
|
|
75
|
+
- [DataGrid] Fix <kbd>Enter</kbd> causing Select to re-open when commiting value (#5756) @m4theushw
|
|
76
|
+
- [DataGrid] Fix `GridOverlays` bypassing pointer events (#5674) @philjones88
|
|
77
|
+
|
|
78
|
+
### `@mui/x-date-pickers@v5.0.0-beta.6` / `@mui/x-date-picker-pro@v5.0.0-beta.6`
|
|
79
|
+
|
|
80
|
+
#### Changes
|
|
81
|
+
|
|
82
|
+
- [DatePicker] Support click on day outside of current month (#5768) @alexfauquette
|
|
83
|
+
- [pickers] Extend `PickersActionBarProps` with `DialogActionProps` (#5798) @LukasTy
|
|
84
|
+
|
|
85
|
+
### Docs
|
|
86
|
+
|
|
87
|
+
- [docs] Fix API anchor link scroll top (#5795) @oliviertassinari
|
|
88
|
+
- [docs] Fix contradiction in the free trial clause (#5732) @oliviertassinari
|
|
89
|
+
- [docs] Fix default value of the DataGrid `logLevel` prop to false (#5784) @HwangTaehyun
|
|
90
|
+
- [docs] Fix typo on the row height page (#5772) @flaviendelangle
|
|
91
|
+
- [docs] Improve "upgrading plans" documentation. (#5683) @joserodolfofreitas
|
|
92
|
+
- [docs] Link the license docs before pricing (#5726) @oliviertassinari
|
|
93
|
+
- [docs] Update packages README files (#5835) @cherniavskii
|
|
94
|
+
- [docs] Use `InputBase` for pickers inputs (#5597) @cherniavskii
|
|
95
|
+
|
|
96
|
+
### Core
|
|
97
|
+
|
|
98
|
+
- [core] Upgrade monorepo (#5771, #5797) @cherniavskii
|
|
99
|
+
- [core] Various TS improvements (#5556) @flaviendelangle
|
|
100
|
+
- [license] Give more context in the missing license (#5731) @oliviertassinari
|
|
101
|
+
- [license] Only log an error type once (#5730) @oliviertassinari
|
|
102
|
+
- [test] Increase timeout to take print screenshot (#5799) @m4theushw
|
|
103
|
+
|
|
104
|
+
## 5.15.2
|
|
105
|
+
|
|
106
|
+
_Aug 11, 2022_
|
|
107
|
+
|
|
108
|
+
We'd like to offer a big thanks to the 7 contributors who made this release possible. Here are some highlights ✨:
|
|
109
|
+
|
|
110
|
+
- ✨ Improve quick filtering with row grouping (#5701) @alexfauquette
|
|
111
|
+
- 📚 Documentation improvements
|
|
112
|
+
- 🐞 Bugfixes
|
|
113
|
+
|
|
114
|
+
### `@mui/x-data-grid@v5.15.2` / `@mui/x-data-grid-pro@v5.15.2` / `@mui/x-data-grid-premium@v5.15.2`
|
|
115
|
+
|
|
116
|
+
#### Changes
|
|
117
|
+
|
|
118
|
+
- [DataGrid] Catch errors if rows freezing is not supported (#5711) @cherniavskii
|
|
119
|
+
- [DataGrid] Preserve cell mode when entering edit mode while commiting (#5686) @m4theushw
|
|
120
|
+
- [DataGridPremium] Let quick filter search in row grouping children (#5701) @alexfauquette
|
|
121
|
+
|
|
122
|
+
### `@mui/x-date-pickers@v5.0.0-beta.5` / `@mui/x-date-picker-pro@5.0.0-beta.5`
|
|
123
|
+
|
|
124
|
+
#### Changes
|
|
125
|
+
|
|
126
|
+
- [pickers] Add `react-dom` to peerDependencies (#5752) @cherniavskii
|
|
127
|
+
- [TimePicker] Set clock focus outline to `none` (#5758) @LukasTy
|
|
128
|
+
- [pickers] Fix theme augmentation with TypeScript (#5596) @alexfauquette
|
|
129
|
+
- [pickers] Reset input value when locale is modified (#5310) @alexfauquette
|
|
130
|
+
- [pickers] Support `disableHighlightToday` on `MonthPicker` and `YearPicker` (#5562) @flaviendelangle
|
|
131
|
+
- [pickers] Fallback to desktop mode when `matchMedia` is unavailable (#5684) @LukasTy
|
|
132
|
+
- [pickers] Trigger `onChange` when clearing or accepting `Invalid date` (#5740) @LukasTy
|
|
133
|
+
|
|
134
|
+
### Docs
|
|
135
|
+
|
|
136
|
+
- [docs] Add RFC GH issue template (#5739) @bytasv
|
|
137
|
+
- [docs] Add description to the `GridExportStateParams` page (#5654) @oliviertassinari
|
|
138
|
+
- [docs] Improve the Events page (#5413) @flaviendelangle
|
|
139
|
+
- [docs] Use new editing API in the introduction demos (#5728) @oliviertassinari
|
|
140
|
+
|
|
141
|
+
### Core
|
|
142
|
+
|
|
143
|
+
- [core] Remove duplicated `FUNDING.yml` file (#5656) @oliviertassinari
|
|
144
|
+
- [core] Remove outdated Next.js options (#5727) @oliviertassinari
|
|
145
|
+
- [core] Update tooling to run with React 18 (#4155) @m4theushw
|
|
146
|
+
- [test] Fix failing dynamic row height tests on Edge (#5707) @m4theushw
|
|
147
|
+
|
|
6
148
|
## 5.15.1
|
|
7
149
|
|
|
8
150
|
_Aug 4, 2022_
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { DateRangeFieldProps } from './DateRangeField.interfaces';
|
|
3
|
+
declare type DateRangeFieldComponent = (<TInputDate, TDate = TInputDate>(props: DateRangeFieldProps<TInputDate, TDate> & React.RefAttributes<HTMLInputElement>) => JSX.Element) & {
|
|
4
|
+
propTypes?: any;
|
|
5
|
+
};
|
|
6
|
+
export declare const DateRangeField: DateRangeFieldComponent;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { TextFieldProps } from '@mui/material/TextField';
|
|
2
|
+
import { UseFieldProps, FieldSection, DefaultizedProps } from '@mui/x-date-pickers/internals';
|
|
3
|
+
import { DateRange } from '../internal/models';
|
|
4
|
+
import { DateRangeValidationError, DateRangeValidationProps } from '../internal/hooks/validation/useDateRangeValidation';
|
|
5
|
+
export interface UseDateRangeFieldProps<TInputDate, TDate> extends UseFieldProps<DateRange<TInputDate>, DateRange<TDate>, DateRangeValidationError>, Partial<Omit<DateRangeValidationProps<TInputDate, TDate>, 'value'>> {
|
|
6
|
+
}
|
|
7
|
+
export declare type UseDateRangeFieldDefaultizedProps<TInputDate, TDate> = DefaultizedProps<UseDateRangeFieldProps<TInputDate, TDate>, 'minDate' | 'maxDate' | 'disableFuture' | 'disablePast'>;
|
|
8
|
+
export declare type DateRangeFieldProps<TInputDate, TDate> = Omit<TextFieldProps, 'value' | 'defaultValue' | 'onChange' | 'onError'> & UseDateRangeFieldProps<TInputDate, TDate>;
|
|
9
|
+
export interface DateRangeFieldSection extends FieldSection {
|
|
10
|
+
dateName: 'start' | 'end';
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import TextField from '@mui/material/TextField';
|
|
4
|
+
import { useDateRangeField } from './useDateRangeField';
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
+
export const DateRangeField = /*#__PURE__*/React.forwardRef(function DateField(inProps, ref) {
|
|
7
|
+
const {
|
|
8
|
+
inputRef,
|
|
9
|
+
inputProps
|
|
10
|
+
} = useDateRangeField(inProps);
|
|
11
|
+
return /*#__PURE__*/_jsx(TextField, _extends({
|
|
12
|
+
ref: ref,
|
|
13
|
+
inputRef: inputRef
|
|
14
|
+
}, inputProps));
|
|
15
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export const splitDateRangeSections = sections => {
|
|
2
|
+
const startDateSections = [];
|
|
3
|
+
const endDateSections = [];
|
|
4
|
+
sections.forEach(section => {
|
|
5
|
+
if (section.dateName === 'start') {
|
|
6
|
+
startDateSections.push(section);
|
|
7
|
+
} else {
|
|
8
|
+
endDateSections.push(section);
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
return {
|
|
12
|
+
startDate: startDateSections,
|
|
13
|
+
endDate: endDateSections
|
|
14
|
+
};
|
|
15
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { FieldValueManager } from '@mui/x-date-pickers/internals';
|
|
2
|
+
import { DateRangeFieldSection, UseDateRangeFieldDefaultizedProps, UseDateRangeFieldProps } from './DateRangeField.interfaces';
|
|
3
|
+
import { DateRange } from '../internal/models';
|
|
4
|
+
import { DateRangeValidationError } from '../internal/hooks/validation/useDateRangeValidation';
|
|
5
|
+
export declare const dateRangeFieldValueManager: FieldValueManager<DateRange<any>, any, DateRangeFieldSection, DateRangeValidationError>;
|
|
6
|
+
export declare const useDefaultizedDateRangeFieldProps: <TInputDate, TDate, AdditionalProps extends {}>(props: UseDateRangeFieldProps<TInputDate, TDate>) => Omit<UseDateRangeFieldProps<TInputDate, TDate>, "disablePast" | "disableFuture" | "maxDate" | "minDate"> & Required<Pick<UseDateRangeFieldProps<TInputDate, TDate>, "disablePast" | "disableFuture" | "maxDate" | "minDate">> & AdditionalProps;
|
|
7
|
+
export declare const useDateRangeField: <TInputDate, TDate, TProps extends UseDateRangeFieldProps<TInputDate, TDate>>(inProps: TProps) => import("@mui/x-date-pickers/internals").UseFieldResponse<Omit<UseDateRangeFieldProps<TInputDate, TDate>, "disablePast" | "disableFuture" | "maxDate" | "minDate"> & Required<Pick<UseDateRangeFieldProps<TInputDate, TDate>, "disablePast" | "disableFuture" | "maxDate" | "minDate">> & TProps>;
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import { useField, splitFormatIntoSections, addPositionPropertiesToSections, createDateStrFromSections, useUtils, useDefaultDates, parseNonNullablePickerDate } from '@mui/x-date-pickers/internals';
|
|
3
|
+
import { dateRangePickerValueManager } from '../DateRangePicker/shared';
|
|
4
|
+
import { splitDateRangeSections } from './DateRangeField.utils';
|
|
5
|
+
import { validateDateRange } from '../internal/hooks/validation/useDateRangeValidation';
|
|
6
|
+
export const dateRangeFieldValueManager = {
|
|
7
|
+
getSectionsFromValue: (utils, prevSections, [start, end], format) => {
|
|
8
|
+
const prevDateRangeSections = prevSections == null ? {
|
|
9
|
+
startDate: null,
|
|
10
|
+
endDate: null
|
|
11
|
+
} : splitDateRangeSections(prevSections);
|
|
12
|
+
|
|
13
|
+
const getSections = (newDate, prevDateSections) => {
|
|
14
|
+
const shouldReUsePrevDateSections = !utils.isValid(newDate) && !!prevDateSections;
|
|
15
|
+
|
|
16
|
+
if (shouldReUsePrevDateSections) {
|
|
17
|
+
return prevDateSections;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
return splitFormatIntoSections(utils, format, newDate);
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
const rawSectionsOfStartDate = getSections(start, prevDateRangeSections.startDate);
|
|
24
|
+
const rawSectionsOfEndDate = getSections(end, prevDateRangeSections.endDate);
|
|
25
|
+
const sectionsOfStartDate = rawSectionsOfStartDate.map((section, sectionIndex) => {
|
|
26
|
+
if (sectionIndex === rawSectionsOfStartDate.length - 1) {
|
|
27
|
+
return _extends({}, section, {
|
|
28
|
+
dateName: 'start',
|
|
29
|
+
separator: ' – '
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
return _extends({}, section, {
|
|
34
|
+
dateName: 'start'
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
const sectionsOfEndDate = rawSectionsOfEndDate.map(section => _extends({}, section, {
|
|
38
|
+
dateName: 'end'
|
|
39
|
+
}));
|
|
40
|
+
return addPositionPropertiesToSections([...sectionsOfStartDate, ...sectionsOfEndDate]);
|
|
41
|
+
},
|
|
42
|
+
getValueStrFromSections: sections => {
|
|
43
|
+
const dateRangeSections = splitDateRangeSections(sections);
|
|
44
|
+
const startDateStr = createDateStrFromSections(dateRangeSections.startDate);
|
|
45
|
+
const endDateStr = createDateStrFromSections(dateRangeSections.endDate);
|
|
46
|
+
return `${startDateStr}${endDateStr}`;
|
|
47
|
+
},
|
|
48
|
+
getValueFromSections: (utils, prevSections, newSections, format) => {
|
|
49
|
+
const removeLastSeparator = sections => sections.map((section, sectionIndex) => {
|
|
50
|
+
if (sectionIndex === sections.length - 1) {
|
|
51
|
+
return _extends({}, section, {
|
|
52
|
+
separator: null
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
return section;
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
const prevDateRangeSections = splitDateRangeSections(prevSections);
|
|
60
|
+
const dateRangeSections = splitDateRangeSections(newSections);
|
|
61
|
+
const startDateStr = createDateStrFromSections(removeLastSeparator(dateRangeSections.startDate));
|
|
62
|
+
const endDateStr = createDateStrFromSections(dateRangeSections.endDate);
|
|
63
|
+
const startDate = utils.parse(startDateStr, format);
|
|
64
|
+
const endDate = utils.parse(endDateStr, format);
|
|
65
|
+
const shouldPublish = startDateStr !== createDateStrFromSections(removeLastSeparator(prevDateRangeSections.startDate)) && utils.isValid(startDate) || endDateStr !== createDateStrFromSections(prevDateRangeSections.endDate) && utils.isValid(endDate);
|
|
66
|
+
return {
|
|
67
|
+
value: [startDate, endDate],
|
|
68
|
+
shouldPublish
|
|
69
|
+
};
|
|
70
|
+
},
|
|
71
|
+
getActiveDateFromActiveSection: (value, activeSection) => {
|
|
72
|
+
const updateActiveDate = dateName => newActiveDate => {
|
|
73
|
+
if (dateName === 'start') {
|
|
74
|
+
return [newActiveDate, value[1]];
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
return [value[0], newActiveDate];
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
if (activeSection.dateName === 'start') {
|
|
81
|
+
return {
|
|
82
|
+
value: value[0],
|
|
83
|
+
update: updateActiveDate('start')
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
return {
|
|
88
|
+
value: value[1],
|
|
89
|
+
update: updateActiveDate('end')
|
|
90
|
+
};
|
|
91
|
+
},
|
|
92
|
+
hasError: error => error[0] != null || error[1] != null
|
|
93
|
+
};
|
|
94
|
+
export const useDefaultizedDateRangeFieldProps = props => {
|
|
95
|
+
const utils = useUtils();
|
|
96
|
+
const defaultDates = useDefaultDates();
|
|
97
|
+
return _extends({
|
|
98
|
+
disablePast: false,
|
|
99
|
+
disableFuture: false
|
|
100
|
+
}, props, {
|
|
101
|
+
minDate: parseNonNullablePickerDate(utils, props.minDate, defaultDates.minDate),
|
|
102
|
+
maxDate: parseNonNullablePickerDate(utils, props.maxDate, defaultDates.maxDate)
|
|
103
|
+
});
|
|
104
|
+
};
|
|
105
|
+
export const useDateRangeField = inProps => {
|
|
106
|
+
const props = useDefaultizedDateRangeFieldProps(inProps);
|
|
107
|
+
return useField({
|
|
108
|
+
props,
|
|
109
|
+
valueManager: dateRangePickerValueManager,
|
|
110
|
+
fieldValueManager: dateRangeFieldValueManager,
|
|
111
|
+
validator: validateDateRange
|
|
112
|
+
});
|
|
113
|
+
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
-
const _excluded = ["desktopModeMediaQuery", "DialogProps", "PopperProps", "TransitionComponent"];
|
|
4
|
-
import PropTypes from 'prop-types';
|
|
3
|
+
const _excluded = ["desktopModeMediaQuery", "DialogProps", "PopperProps", "PaperProps", "TransitionComponent"];
|
|
5
4
|
import * as React from 'react';
|
|
5
|
+
import PropTypes from 'prop-types';
|
|
6
6
|
import { useThemeProps } from '@mui/material/styles';
|
|
7
7
|
import { useLicenseVerifier } from '@mui/x-license-pro';
|
|
8
8
|
import useMediaQuery from '@mui/material/useMediaQuery';
|
|
@@ -33,16 +33,21 @@ export const DateRangePicker = /*#__PURE__*/React.forwardRef(function DateRangeP
|
|
|
33
33
|
desktopModeMediaQuery = '@media (pointer: fine)',
|
|
34
34
|
DialogProps,
|
|
35
35
|
PopperProps,
|
|
36
|
+
PaperProps,
|
|
36
37
|
TransitionComponent
|
|
37
38
|
} = props,
|
|
38
|
-
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
39
|
+
other = _objectWithoutPropertiesLoose(props, _excluded); // defaults to `true` in environments where `window.matchMedia` would not be available (i.e. test/jsdom)
|
|
39
40
|
|
|
40
|
-
|
|
41
|
+
|
|
42
|
+
const isDesktop = useMediaQuery(desktopModeMediaQuery, {
|
|
43
|
+
defaultMatches: true
|
|
44
|
+
});
|
|
41
45
|
|
|
42
46
|
if (isDesktop) {
|
|
43
47
|
return /*#__PURE__*/_jsx(DesktopDateRangePicker, _extends({
|
|
44
48
|
ref: ref,
|
|
45
49
|
PopperProps: PopperProps,
|
|
50
|
+
PaperProps: PaperProps,
|
|
46
51
|
TransitionComponent: TransitionComponent
|
|
47
52
|
}, other));
|
|
48
53
|
}
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import Typography from '@mui/material/Typography';
|
|
3
3
|
import { styled } from '@mui/material/styles';
|
|
4
4
|
import { generateUtilityClasses } from '@mui/material';
|
|
5
|
-
import { PickersToolbar, PickersToolbarButton, pickersToolbarClasses, useUtils } from '@mui/x-date-pickers/internals';
|
|
5
|
+
import { PickersToolbar, PickersToolbarButton, pickersToolbarClasses, useUtils, useLocaleText } from '@mui/x-date-pickers/internals';
|
|
6
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
7
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
8
|
export const dateRangePickerToolbarClasses = generateUtilityClasses('MuiDateRangePickerToolbar', ['root']);
|
|
@@ -34,8 +34,10 @@ export const DateRangePickerToolbar = props => {
|
|
|
34
34
|
startText,
|
|
35
35
|
toggleMobileKeyboardView,
|
|
36
36
|
toolbarFormat,
|
|
37
|
-
toolbarTitle
|
|
37
|
+
toolbarTitle: toolbarTitleProp
|
|
38
38
|
} = props;
|
|
39
|
+
const localeText = useLocaleText();
|
|
40
|
+
const toolbarTitle = toolbarTitleProp != null ? toolbarTitleProp : localeText.dateRangePickerDefaultToolbarTitle;
|
|
39
41
|
const startDateValue = start ? utils.formatByString(start, toolbarFormat || utils.formats.shortDate) : startText;
|
|
40
42
|
const endDateValue = end ? utils.formatByString(end, toolbarFormat || utils.formats.shortDate) : endText;
|
|
41
43
|
const ownerState = props;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { ExportedCalendarPickerProps, PickerStatePickerProps } from '@mui/x-date-pickers/internals';
|
|
2
|
+
import { ExportedCalendarPickerProps, PickerStatePickerProps, BaseDateValidationProps } from '@mui/x-date-pickers/internals';
|
|
3
3
|
import { DateRange, CurrentlySelectingRangeEndProps } from '../internal/models/dateRange';
|
|
4
4
|
import { DateRangePickerViewMobileSlotsComponent, DateRangePickerViewMobileSlotsComponentsProps } from './DateRangePickerViewMobile';
|
|
5
5
|
import { DateRangeInputProps } from './DateRangePickerInput';
|
|
@@ -8,7 +8,7 @@ export interface DateRangePickerViewSlotsComponent extends DateRangePickerViewMo
|
|
|
8
8
|
}
|
|
9
9
|
export interface DateRangePickerViewSlotsComponentsProps extends DateRangePickerViewMobileSlotsComponentsProps {
|
|
10
10
|
}
|
|
11
|
-
export interface ExportedDateRangePickerViewProps<TDate> extends ExportedDesktopDateRangeCalendarProps<TDate>, Omit<ExportedCalendarPickerProps<TDate>, 'onYearChange' | 'renderDay'
|
|
11
|
+
export interface ExportedDateRangePickerViewProps<TDate> extends ExportedDesktopDateRangeCalendarProps<TDate>, Omit<ExportedCalendarPickerProps<TDate>, 'onYearChange' | 'renderDay' | keyof BaseDateValidationProps<TDate>> {
|
|
12
12
|
/**
|
|
13
13
|
* Overrideable components.
|
|
14
14
|
* @default {}
|
|
@@ -42,7 +42,7 @@ export interface ExportedDateRangePickerViewProps<TDate> extends ExportedDesktop
|
|
|
42
42
|
*/
|
|
43
43
|
className?: string;
|
|
44
44
|
}
|
|
45
|
-
interface DateRangePickerViewProps<TInputDate, TDate> extends CurrentlySelectingRangeEndProps, ExportedDateRangePickerViewProps<TDate>, PickerStatePickerProps<DateRange<TDate>> {
|
|
45
|
+
interface DateRangePickerViewProps<TInputDate, TDate> extends CurrentlySelectingRangeEndProps, ExportedDateRangePickerViewProps<TDate>, PickerStatePickerProps<DateRange<TDate>>, Required<BaseDateValidationProps<TDate>> {
|
|
46
46
|
calendars: 1 | 2 | 3;
|
|
47
47
|
open: boolean;
|
|
48
48
|
startText: React.ReactNode;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
2
|
+
import { ExportedArrowSwitcherProps, DayPickerProps, DayValidationProps } from '@mui/x-date-pickers/internals';
|
|
3
3
|
import { DateRange } from '../internal/models';
|
|
4
4
|
import { DateRangePickerDayProps } from '../DateRangePickerDay';
|
|
5
5
|
export interface ExportedDesktopDateRangeCalendarProps<TDate> {
|
|
@@ -18,7 +18,7 @@ export interface ExportedDesktopDateRangeCalendarProps<TDate> {
|
|
|
18
18
|
*/
|
|
19
19
|
renderDay?: (day: TDate, dateRangePickerDayProps: DateRangePickerDayProps<TDate>) => JSX.Element;
|
|
20
20
|
}
|
|
21
|
-
interface DesktopDateRangeCalendarProps<TDate> extends ExportedDesktopDateRangeCalendarProps<TDate>, Omit<DayPickerProps<TDate>, 'selectedDays' | 'renderDay' | 'onFocusedDayChange'>,
|
|
21
|
+
interface DesktopDateRangeCalendarProps<TDate> extends ExportedDesktopDateRangeCalendarProps<TDate>, Omit<DayPickerProps<TDate>, 'selectedDays' | 'renderDay' | 'onFocusedDayChange'>, DayValidationProps<TDate>, ExportedArrowSwitcherProps {
|
|
22
22
|
calendars: 1 | 2 | 3;
|
|
23
23
|
parsedValue: DateRange<TDate>;
|
|
24
24
|
changeMonth: (date: TDate) => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ExportedCalendarHeaderProps,
|
|
2
|
+
import { ExportedCalendarHeaderProps, DayPickerProps, PickersCalendarHeaderSlotsComponent, PickersCalendarHeaderSlotsComponentsProps, DayValidationProps } from '@mui/x-date-pickers/internals';
|
|
3
3
|
import { DateRange } from '../internal/models/dateRange';
|
|
4
4
|
import { ExportedDesktopDateRangeCalendarProps } from './DateRangePickerViewDesktop';
|
|
5
5
|
export interface DateRangePickerViewMobileSlotsComponent extends PickersCalendarHeaderSlotsComponent {
|
|
@@ -8,7 +8,7 @@ export interface DateRangePickerViewMobileSlotsComponentsProps extends PickersCa
|
|
|
8
8
|
}
|
|
9
9
|
export interface ExportedMobileDateRangeCalendarProps<TDate> extends Pick<ExportedDesktopDateRangeCalendarProps<TDate>, 'renderDay'> {
|
|
10
10
|
}
|
|
11
|
-
interface DesktopDateRangeCalendarProps<TDate> extends ExportedMobileDateRangeCalendarProps<TDate>, Omit<DayPickerProps<TDate>, 'selectedDays' | 'renderDay' | 'onFocusedDayChange'>,
|
|
11
|
+
interface DesktopDateRangeCalendarProps<TDate> extends ExportedMobileDateRangeCalendarProps<TDate>, Omit<DayPickerProps<TDate>, 'selectedDays' | 'renderDay' | 'onFocusedDayChange'>, DayValidationProps<TDate>, ExportedCalendarHeaderProps<TDate> {
|
|
12
12
|
/**
|
|
13
13
|
* Overrideable components.
|
|
14
14
|
* @default {}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { BasePickerProps, PickerStateValueManager, ValidationProps } from '@mui/x-date-pickers/internals';
|
|
2
|
+
import { BasePickerProps, PickerStateValueManager, ValidationProps, DefaultizedProps, BaseDateValidationProps } from '@mui/x-date-pickers/internals';
|
|
3
3
|
import { ExportedDateRangePickerViewProps } from './DateRangePickerView';
|
|
4
4
|
import { DateRangeValidationError } from '../internal/hooks/validation/useDateRangeValidation';
|
|
5
5
|
import { DateRange } from '../internal/models';
|
|
6
6
|
import { ExportedDateRangePickerInputProps } from './DateRangePickerInput';
|
|
7
|
-
export interface BaseDateRangePickerProps<TInputDate, TDate> extends Omit<BasePickerProps<DateRange<TInputDate>, DateRange<TDate>>, 'orientation'>, ExportedDateRangePickerViewProps<TDate>, ValidationProps<DateRangeValidationError, DateRange<TInputDate>>, ExportedDateRangePickerInputProps<TInputDate, TDate> {
|
|
7
|
+
export interface BaseDateRangePickerProps<TInputDate, TDate> extends Omit<BasePickerProps<DateRange<TInputDate>, DateRange<TDate>>, 'orientation'>, ExportedDateRangePickerViewProps<TDate>, BaseDateValidationProps<TDate>, ValidationProps<DateRangeValidationError, DateRange<TInputDate>>, ExportedDateRangePickerInputProps<TInputDate, TDate> {
|
|
8
8
|
/**
|
|
9
9
|
* Text for end input label and toolbar placeholder.
|
|
10
10
|
* @default 'End'
|
|
@@ -30,8 +30,7 @@ export interface BaseDateRangePickerProps<TInputDate, TDate> extends Omit<BasePi
|
|
|
30
30
|
*/
|
|
31
31
|
startText?: React.ReactNode;
|
|
32
32
|
}
|
|
33
|
-
export declare
|
|
33
|
+
export declare function useDateRangePickerDefaultizedProps<TInputDate, TDate, Props extends BaseDateRangePickerProps<TInputDate, TDate>>(props: Props, name: string): DefaultizedProps<Props, 'calendars' | 'startText' | 'endText' | keyof BaseDateValidationProps<TDate>, {
|
|
34
34
|
inputFormat: string;
|
|
35
|
-
}
|
|
36
|
-
export declare function useDateRangePickerDefaultizedProps<TInputDate, TDate, Props extends BaseDateRangePickerProps<TInputDate, TDate>>(props: Props, name: string): DefaultizedProps<Props> & Required<Pick<BaseDateRangePickerProps<TInputDate, TDate>, 'calendars' | 'startText' | 'endText'>>;
|
|
35
|
+
}>;
|
|
37
36
|
export declare const dateRangePickerValueManager: PickerStateValueManager<[any, any], [any, any], any>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
import { buildDeprecatedPropsWarning, useDefaultDates, useLocaleText, useUtils } from '@mui/x-date-pickers/internals';
|
|
2
|
+
import { buildDeprecatedPropsWarning, useDefaultDates, useLocaleText, useUtils, parseNonNullablePickerDate } from '@mui/x-date-pickers/internals';
|
|
3
3
|
import { useThemeProps } from '@mui/material/styles';
|
|
4
4
|
import { parseRangeInputValue } from '../internal/utils/date-utils';
|
|
5
5
|
const deprecatedPropsWarning = buildDeprecatedPropsWarning('Props for translation are deprecated. See https://mui.com/x/react-date-pickers/localization for more information.');
|
|
@@ -22,13 +22,15 @@ export function useDateRangePickerDefaultizedProps(props, name) {
|
|
|
22
22
|
const startText = (_themeProps$startText = themeProps.startText) != null ? _themeProps$startText : localeText.start;
|
|
23
23
|
const endText = (_themeProps$endText = themeProps.endText) != null ? _themeProps$endText : localeText.end;
|
|
24
24
|
return _extends({
|
|
25
|
+
disableFuture: false,
|
|
26
|
+
disablePast: false,
|
|
25
27
|
calendars: 2,
|
|
26
|
-
inputFormat: utils.formats.keyboardDate
|
|
27
|
-
minDate: defaultDates.minDate,
|
|
28
|
-
maxDate: defaultDates.maxDate
|
|
28
|
+
inputFormat: utils.formats.keyboardDate
|
|
29
29
|
}, themeProps, {
|
|
30
30
|
endText,
|
|
31
|
-
startText
|
|
31
|
+
startText,
|
|
32
|
+
minDate: parseNonNullablePickerDate(utils, themeProps.minDate, defaultDates.minDate),
|
|
33
|
+
maxDate: parseNonNullablePickerDate(utils, themeProps.maxDate, defaultDates.maxDate)
|
|
32
34
|
});
|
|
33
35
|
}
|
|
34
36
|
export const dateRangePickerValueManager = {
|
|
@@ -154,7 +154,6 @@ const DateRangePickerDayRaw = /*#__PURE__*/React.forwardRef(function DateRangePi
|
|
|
154
154
|
className: clsx(classes.root, className),
|
|
155
155
|
ownerState: ownerState,
|
|
156
156
|
children: /*#__PURE__*/_jsx(DateRangePickerDayRangeIntervalPreview, {
|
|
157
|
-
role: "cell",
|
|
158
157
|
className: classes.rangeIntervalPreview,
|
|
159
158
|
ownerState: ownerState,
|
|
160
159
|
children: /*#__PURE__*/_jsx(DateRangePickerDayDay, _extends({}, other, {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
-
const _excluded = ["value", "onChange", "PopperProps", "TransitionComponent", "components", "componentsProps"];
|
|
3
|
+
const _excluded = ["value", "onChange", "PopperProps", "PaperProps", "TransitionComponent", "components", "componentsProps"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import { useLicenseVerifier } from '@mui/x-license-pro';
|
|
@@ -37,6 +37,7 @@ export const DesktopDateRangePicker = /*#__PURE__*/React.forwardRef(function Des
|
|
|
37
37
|
|
|
38
38
|
const {
|
|
39
39
|
PopperProps,
|
|
40
|
+
PaperProps,
|
|
40
41
|
TransitionComponent,
|
|
41
42
|
components,
|
|
42
43
|
componentsProps
|
|
@@ -56,6 +57,7 @@ export const DesktopDateRangePicker = /*#__PURE__*/React.forwardRef(function Des
|
|
|
56
57
|
DateInputProps: DateInputProps,
|
|
57
58
|
KeyboardDateInputComponent: KeyboardDateInputComponent,
|
|
58
59
|
PopperProps: PopperProps,
|
|
60
|
+
PaperProps: PaperProps,
|
|
59
61
|
TransitionComponent: TransitionComponent,
|
|
60
62
|
components: components,
|
|
61
63
|
componentsProps: componentsProps,
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { MultiInputDateRangeFieldProps } from './MultiInputDateRangeField.interfaces';
|
|
3
|
+
declare type MultiInputDateRangeFieldComponent = (<TInputDate, TDate = TInputDate>(props: MultiInputDateRangeFieldProps<TInputDate, TDate> & React.RefAttributes<HTMLInputElement>) => JSX.Element) & {
|
|
4
|
+
propTypes?: any;
|
|
5
|
+
};
|
|
6
|
+
export declare const MultiInputDateRangeField: MultiInputDateRangeFieldComponent;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { UseDateRangeFieldProps } from '../DateRangeField';
|
|
2
|
+
export interface UseMultiInputDateRangeFieldProps<TInputDate, TDate> extends UseDateRangeFieldProps<TInputDate, TDate> {
|
|
3
|
+
}
|
|
4
|
+
export interface MultiInputDateRangeFieldProps<TInputDate, TDate> extends UseMultiInputDateRangeFieldProps<TInputDate, TDate> {
|
|
5
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import Stack from '@mui/material/Stack';
|
|
4
|
+
import TextField from '@mui/material/TextField';
|
|
5
|
+
import Typography from '@mui/material/Typography';
|
|
6
|
+
import { useMultiInputDateRangeField } from './useMultiInputDateRangeField';
|
|
7
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
|
+
export const MultiInputDateRangeField = /*#__PURE__*/React.forwardRef(function MultiInputDateRangeField(inProps, ref) {
|
|
10
|
+
const {
|
|
11
|
+
startDate,
|
|
12
|
+
endDate
|
|
13
|
+
} = useMultiInputDateRangeField(inProps);
|
|
14
|
+
return /*#__PURE__*/_jsxs(Stack, {
|
|
15
|
+
spacing: 2,
|
|
16
|
+
direction: "row",
|
|
17
|
+
alignItems: "center",
|
|
18
|
+
ref: ref,
|
|
19
|
+
children: [/*#__PURE__*/_jsx(TextField, _extends({
|
|
20
|
+
inputRef: startDate.inputRef
|
|
21
|
+
}, startDate.inputProps)), /*#__PURE__*/_jsx(Typography, {
|
|
22
|
+
children: "to"
|
|
23
|
+
}), /*#__PURE__*/_jsx(TextField, _extends({
|
|
24
|
+
inputRef: endDate.inputRef
|
|
25
|
+
}, endDate.inputProps))]
|
|
26
|
+
});
|
|
27
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { MultiInputDateRangeField as Unstable_MultiInputDateRangeField } from './MultiInputDateRangeField';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { MultiInputDateRangeField as Unstable_MultiInputDateRangeField } from './MultiInputDateRangeField';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { UseFieldResponse } from '@mui/x-date-pickers/internals';
|
|
2
|
+
import { UseMultiInputDateRangeFieldProps } from './MultiInputDateRangeField.interfaces';
|
|
3
|
+
export declare const useMultiInputDateRangeField: <TInputDate, TDate, TProps extends UseMultiInputDateRangeFieldProps<TInputDate, TDate>>(inProps: TProps) => {
|
|
4
|
+
startDate: UseFieldResponse<{}>;
|
|
5
|
+
endDate: UseFieldResponse<{}>;
|
|
6
|
+
};
|