@mui/x-date-pickers-pro 6.0.0-beta.2 → 6.0.0-beta.4
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 +164 -0
- package/DateRangeCalendar/DateRangeCalendar.js +9 -7
- package/DateRangeCalendar/DateRangeCalendar.types.d.ts +2 -3
- package/DateRangePicker/DateRangePicker.js +10 -9
- package/DesktopDateRangePicker/DesktopDateRangePicker.js +10 -9
- package/MobileDateRangePicker/MobileDateRangePicker.js +10 -9
- package/MultiInputDateRangeField/MultiInputDateRangeField.js +12 -6
- package/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +12 -6
- package/MultiInputTimeRangeField/MultiInputTimeRangeField.js +11 -5
- package/SingleInputDateRangeField/SingleInputDateRangeField.js +6 -4
- package/SingleInputDateRangeField/useSingleInputDateRangeField.d.ts +1 -1
- package/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +6 -4
- package/SingleInputDateTimeRangeField/useSingleInputDateTimeRangeField.d.ts +1 -1
- package/SingleInputTimeRangeField/SingleInputTimeRangeField.js +5 -3
- package/SingleInputTimeRangeField/useSingleInputTimeRangeField.d.ts +1 -1
- package/StaticDateRangePicker/StaticDateRangePicker.js +8 -7
- package/index.d.ts +2 -1
- package/index.js +1 -1
- package/internal/hooks/useDesktopRangePicker/useDesktopRangePicker.js +9 -23
- package/internal/hooks/useDesktopRangePicker/useDesktopRangePicker.types.d.ts +0 -12
- package/internal/hooks/useMobileRangePicker/useMobileRangePicker.js +3 -15
- package/internal/hooks/useMultiInputRangeField/useMultiInputDateRangeField.d.ts +2 -1
- package/internal/hooks/useMultiInputRangeField/useMultiInputDateTimeRangeField.d.ts +2 -1
- package/internal/hooks/useMultiInputRangeField/useMultiInputRangeField.types.d.ts +4 -10
- package/internal/hooks/useMultiInputRangeField/useMultiInputTimeRangeField.d.ts +2 -1
- package/internal/hooks/useRangePickerInputProps.d.ts +4 -25
- package/internal/models/dateRange.d.ts +1 -1
- package/internal/models/fields.d.ts +32 -28
- package/internal/utils/date-fields-utils.d.ts +1 -1
- package/internal/utils/releaseInfo.js +1 -1
- package/legacy/DateRangeCalendar/DateRangeCalendar.js +13 -7
- package/legacy/DateRangePicker/DateRangePicker.js +10 -9
- package/legacy/DesktopDateRangePicker/DesktopDateRangePicker.js +10 -9
- package/legacy/MobileDateRangePicker/MobileDateRangePicker.js +10 -9
- package/legacy/MultiInputDateRangeField/MultiInputDateRangeField.js +12 -6
- package/legacy/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +12 -6
- package/legacy/MultiInputTimeRangeField/MultiInputTimeRangeField.js +11 -5
- package/legacy/SingleInputDateRangeField/SingleInputDateRangeField.js +6 -4
- package/legacy/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +6 -4
- package/legacy/SingleInputTimeRangeField/SingleInputTimeRangeField.js +5 -3
- package/legacy/StaticDateRangePicker/StaticDateRangePicker.js +8 -7
- package/legacy/index.js +1 -1
- package/legacy/internal/hooks/useDesktopRangePicker/useDesktopRangePicker.js +9 -23
- package/legacy/internal/hooks/useMobileRangePicker/useMobileRangePicker.js +3 -15
- package/legacy/internal/utils/releaseInfo.js +1 -1
- package/legacy/tests/describeRangeValidation/describeRangeValidation.js +18 -18
- package/modern/DateRangeCalendar/DateRangeCalendar.js +9 -7
- package/modern/DateRangePicker/DateRangePicker.js +10 -9
- package/modern/DesktopDateRangePicker/DesktopDateRangePicker.js +10 -9
- package/modern/MobileDateRangePicker/MobileDateRangePicker.js +10 -9
- package/modern/MultiInputDateRangeField/MultiInputDateRangeField.js +12 -6
- package/modern/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +12 -6
- package/modern/MultiInputTimeRangeField/MultiInputTimeRangeField.js +11 -5
- package/modern/SingleInputDateRangeField/SingleInputDateRangeField.js +6 -4
- package/modern/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +6 -4
- package/modern/SingleInputTimeRangeField/SingleInputTimeRangeField.js +5 -3
- package/modern/StaticDateRangePicker/StaticDateRangePicker.js +8 -7
- package/modern/index.js +1 -1
- package/modern/internal/hooks/useDesktopRangePicker/useDesktopRangePicker.js +8 -22
- package/modern/internal/hooks/useMobileRangePicker/useMobileRangePicker.js +3 -12
- package/modern/internal/utils/releaseInfo.js +1 -1
- package/modern/tests/describeRangeValidation/describeRangeValidation.js +18 -18
- package/node/DateRangeCalendar/DateRangeCalendar.js +9 -7
- package/node/DateRangePicker/DateRangePicker.js +10 -9
- package/node/DesktopDateRangePicker/DesktopDateRangePicker.js +10 -9
- package/node/MobileDateRangePicker/MobileDateRangePicker.js +10 -9
- package/node/MultiInputDateRangeField/MultiInputDateRangeField.js +12 -6
- package/node/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +12 -6
- package/node/MultiInputTimeRangeField/MultiInputTimeRangeField.js +11 -5
- package/node/SingleInputDateRangeField/SingleInputDateRangeField.js +6 -4
- package/node/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +6 -4
- package/node/SingleInputTimeRangeField/SingleInputTimeRangeField.js +5 -3
- package/node/StaticDateRangePicker/StaticDateRangePicker.js +8 -7
- package/node/index.js +1 -1
- package/node/internal/hooks/useDesktopRangePicker/useDesktopRangePicker.js +7 -21
- package/node/internal/hooks/useMobileRangePicker/useMobileRangePicker.js +3 -12
- package/node/internal/utils/releaseInfo.js +1 -1
- package/node/tests/describeRangeValidation/describeRangeValidation.js +20 -19
- package/package.json +5 -5
- package/tests/describeRangeValidation/describeRangeValidation.js +18 -18
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,112 @@
|
|
|
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
|
+
## 6.0.0-beta.4
|
|
7
|
+
|
|
8
|
+
_Feb 16, 2023_
|
|
9
|
+
|
|
10
|
+
We'd like to offer a big thanks to the 8 contributors who made this release possible. Here are some highlights ✨:
|
|
11
|
+
|
|
12
|
+
- ⚡️ Improve grid performance by reducing rerenders (#7857) @cherniavskii
|
|
13
|
+
- 📚 Documentation improvements
|
|
14
|
+
- 🐞 Bugfixes
|
|
15
|
+
|
|
16
|
+
### `@mui/x-data-grid@v6.0.0-beta.4` / `@mui/x-data-grid-pro@v6.0.0-beta.4` / `@mui/x-data-grid-premium@v6.0.0-beta.4`
|
|
17
|
+
|
|
18
|
+
#### Changes
|
|
19
|
+
|
|
20
|
+
- [DataGrid] Add interface for `singleSelect` column (#7685) @m4theushw
|
|
21
|
+
- [DataGrid] Allow to pass props to the `TrapFocus` inside the panel wrapper (#7733) @Vivek-Prajapatii
|
|
22
|
+
- [DataGrid] Avoid unnecessary rerenders after `updateRows` (#7857) @cherniavskii
|
|
23
|
+
- [DataGridPro] Change cursor when dragging a column (#7725) @sai6855
|
|
24
|
+
- [DataGridPremium] Fix `leafField` to have correct focus value (#7950) @MBilalShafi
|
|
25
|
+
|
|
26
|
+
### `@mui/x-date-pickers@v6.0.0-beta.4` / `@mui/x-date-pickers-pro@v6.0.0-beta.4`
|
|
27
|
+
|
|
28
|
+
#### Changes
|
|
29
|
+
|
|
30
|
+
- [DateRangePicker] Fix slide transition by avoiding useless component re-rendering (#7874) @LukasTy
|
|
31
|
+
- [fields] Support Backspace key on `Android` (#7842) @flaviendelangle
|
|
32
|
+
- [fields] Support escaped characters on `Luxon` (#7888) @flaviendelangle
|
|
33
|
+
- [pickers] Prepare new pickers for custom fields (#7806) @flaviendelangle
|
|
34
|
+
|
|
35
|
+
### `@mui/x-codemod@v6.0.0-beta.4`
|
|
36
|
+
|
|
37
|
+
#### Changes
|
|
38
|
+
|
|
39
|
+
- [codemod] Fix import path (#7952) @LukasTy
|
|
40
|
+
|
|
41
|
+
### Docs
|
|
42
|
+
|
|
43
|
+
- [docs] Add an info callout specifying the current state of desktop time view (#7933) @LukasTy
|
|
44
|
+
- [docs] Add missing param in `useGridApiEventHandler` examples (#7939) @flaviendelangle
|
|
45
|
+
- [docs] Fix markdown table alignments (#7898) @oliviertassinari
|
|
46
|
+
- [docs] Improve `DataGrid` migration guide (#7861) @MBilalShafi
|
|
47
|
+
- [docs] Update `LocalizationProvider` `dateAdapter` with a link to the doc (#7872) @LukasTy
|
|
48
|
+
|
|
49
|
+
### Core
|
|
50
|
+
|
|
51
|
+
- [core] Run editing field tests on all major adapters (#7868) @flaviendelangle
|
|
52
|
+
|
|
53
|
+
## 6.0.0-beta.3
|
|
54
|
+
|
|
55
|
+
_Feb 9, 2023_
|
|
56
|
+
|
|
57
|
+
We'd like to offer a big thanks to the 11 contributors who made this release possible. Here are some highlights ✨:
|
|
58
|
+
|
|
59
|
+
- ⬅️ Add right-to-left support for the data grid (#6580) @yaredtsy
|
|
60
|
+
- ⚡️ Improve grid resize performance (#7864) @cherniavskii
|
|
61
|
+
- ✨ New codemods for migrating to v6 @MBilalShafi
|
|
62
|
+
- 📚 Documentation improvements
|
|
63
|
+
- 🐞 Bugfixes
|
|
64
|
+
|
|
65
|
+
### `@mui/x-data-grid@v6.0.0-beta.3` / `@mui/x-data-grid-pro@v6.0.0-beta.3` / `@mui/x-data-grid-premium@v6.0.0-beta.3`
|
|
66
|
+
|
|
67
|
+
#### Changes
|
|
68
|
+
|
|
69
|
+
- [DataGrid] Add `BaseIconButton` component slot (#7329) @123joshuawu
|
|
70
|
+
- [DataGrid] Allow to customize the value displayed in the filter button tooltip (#6956) @ithrforu
|
|
71
|
+
- [DataGrid] Improve grid resize performance (#7864) @cherniavskii
|
|
72
|
+
- [DataGrid] Make `apiRef.current.getRowWithUpdatedValues` stable (#7788) @m4theushw
|
|
73
|
+
- [DataGrid] Support RTL (#6580) @yaredtsy
|
|
74
|
+
- [DataGrid] Improve query selectors for selecting cell element (#7354) @yaredtsy
|
|
75
|
+
- [l10n] Improve Brazilian Portuguese (pt-BR) locale (#7854) @ed-ateixeira
|
|
76
|
+
|
|
77
|
+
### `@mui/x-date-pickers@v6.0.0-beta.3` / `@mui/x-date-pickers-pro@v6.0.0-beta.3`
|
|
78
|
+
|
|
79
|
+
#### Changes
|
|
80
|
+
|
|
81
|
+
- [fields] Allow to select year 2000 on 2-digit year section (#7858) @flaviendelangle
|
|
82
|
+
- [fields] Fix year editing on `day.js` (#7862) @flaviendelangle
|
|
83
|
+
- [fields] Fix year editing on valid date (#7834) @flaviendelangle
|
|
84
|
+
- [fields] Reset query when pressing `Backspace` or `Delete` (#7855) @flaviendelangle
|
|
85
|
+
- [pickers] Clean Popper position on new pickers (#7445) @flaviendelangle
|
|
86
|
+
- [pickers] Ditch pickers `skipLibCheck` (#7808) @LukasTy
|
|
87
|
+
- [pickers] Improve JSDoc and resulting API docs pages (#7847) @LukasTy
|
|
88
|
+
|
|
89
|
+
### `@mui/x-codemod@v6.0.0-beta.3`
|
|
90
|
+
|
|
91
|
+
#### Changes
|
|
92
|
+
|
|
93
|
+
- [codemod] Add more cases to `rename-selectors-and-events` codemod (#7856) @MBilalShafi
|
|
94
|
+
- [codemod] Add warning message to the codemods and migration guide (#7813) @MBilalShafi
|
|
95
|
+
- [codemod] Add codemod to remove unnecessary `experimentalFeatures` flag (#7836) @MBilalShafi
|
|
96
|
+
- [codemod] Rename `GridFilterItem` props (#7483) @MBilalShafi
|
|
97
|
+
- [codemod] Rename `linkOperators` to `logicOperators` (#7707) @MBilalShafi
|
|
98
|
+
- [codemod] Replace `onCellFocusOut` prop for Data Grid (#7786) @MBilalShafi
|
|
99
|
+
|
|
100
|
+
### Docs
|
|
101
|
+
|
|
102
|
+
- [docs] Add a "Whats new in v6" page linked on the sidebar (#7820) @joserodolfofreitas
|
|
103
|
+
- [docs] Fix hydration crash in pickers (#7734) @oliviertassinari
|
|
104
|
+
- [docs] Remove no longer relevant range shortcuts section (#7840) @LukasTy
|
|
105
|
+
- [docs] Use `@next` tag in grid and pickers installation instructions (#7814) @cherniavskii
|
|
106
|
+
|
|
107
|
+
### Core
|
|
108
|
+
|
|
109
|
+
- [core] Remove `tslint` package leftovers (#7841) @LukasTy
|
|
110
|
+
- [test] Use `createDescribes` for `describeValue` and `describeValidation` (#7866) @flaviendelangle
|
|
111
|
+
|
|
6
112
|
## 6.0.0-beta.2
|
|
7
113
|
|
|
8
114
|
We'd like to offer a big thanks to the 11 contributors who made this release possible. Here are some highlights ✨:
|
|
@@ -2073,6 +2179,64 @@ You can find more information about the new api, including how to set those tran
|
|
|
2073
2179
|
- [test] Skip tests for column pinning and dynamic row height (#5997) @m4theushw
|
|
2074
2180
|
- [website] Improve security header @oliviertassinari
|
|
2075
2181
|
|
|
2182
|
+
## 5.17.24
|
|
2183
|
+
|
|
2184
|
+
_Feb 16, 2023_
|
|
2185
|
+
|
|
2186
|
+
We'd like to offer a big thanks to the 5 contributors who made this release possible. Here are some highlights ✨:
|
|
2187
|
+
|
|
2188
|
+
- 🌍 Add Hungarian (hu-HU) locale
|
|
2189
|
+
- 🐞 Bugfixes
|
|
2190
|
+
|
|
2191
|
+
### `@mui/x-data-grid@v5.17.24` / `@mui/x-data-grid-pro@v5.17.24` / `@mui/x-data-grid-premium@v5.17.24`
|
|
2192
|
+
|
|
2193
|
+
#### Changes
|
|
2194
|
+
|
|
2195
|
+
- [DataGrid] Allow to pass props to the `TrapFocus` inside the panel wrapper (#7897) @Vivek-Prajapatii
|
|
2196
|
+
- [DataGrid] Avoid unnecessary rerenders after `updateRows` (#7945) @cherniavskii
|
|
2197
|
+
- [DataGridPro] Change cursor when dragging a column (#7878) @sai6855
|
|
2198
|
+
- [DataGridPremium] Fix `leafField` to have correct focus value (#7959) @MBilalShafi
|
|
2199
|
+
|
|
2200
|
+
### `@mui/x-date-pickers@v5.0.19` / `@mui/x-date-pickers-pro@v5.0.19`
|
|
2201
|
+
|
|
2202
|
+
#### Changes
|
|
2203
|
+
|
|
2204
|
+
- [l10n] Add Hungarian (hu-HU) locale (#7796) @noherczeg
|
|
2205
|
+
|
|
2206
|
+
## 5.17.23
|
|
2207
|
+
|
|
2208
|
+
_Feb 9, 2023_
|
|
2209
|
+
|
|
2210
|
+
We'd like to offer a big thanks to the 6 contributors who made this release possible. Here are some highlights ✨:
|
|
2211
|
+
|
|
2212
|
+
- 🌍 Improve Brazilian Portuguese (pt-BR) locale
|
|
2213
|
+
- 🎉 Add banner and callouts to inform about MUI X v6 beta
|
|
2214
|
+
- 🐞 Bugfixes
|
|
2215
|
+
|
|
2216
|
+
### `@mui/x-data-grid@v5.17.23` / `@mui/x-data-grid-pro@v5.17.23` / `@mui/x-data-grid-premium@v5.17.23`
|
|
2217
|
+
|
|
2218
|
+
#### Changes
|
|
2219
|
+
|
|
2220
|
+
- [DataGrid] Allow to customize the value displayed in the filter button tooltip (#7816) @ithrforu
|
|
2221
|
+
- [DataGrid] Fix `getCellElement` method not working with pinned columns (#7844) @yaredtsy
|
|
2222
|
+
- [DataGrid] Fix stale rows issue in `unstable_replaceRows` (#7694) @MBilalShafi
|
|
2223
|
+
- [l10n] Improve Brazilian Portuguese (pt-BR) locale (#7850) @ed-ateixeira
|
|
2224
|
+
|
|
2225
|
+
### `@mui/x-date-pickers@v_5.0.18` / `@mui/x-date-pickers-pro@v_5.0.18`
|
|
2226
|
+
|
|
2227
|
+
#### Changes
|
|
2228
|
+
|
|
2229
|
+
- [pickers] Update pickers when new value has a distinct timezone (#7853) @alexfauquette
|
|
2230
|
+
|
|
2231
|
+
### Docs
|
|
2232
|
+
|
|
2233
|
+
- [docs] Add messages in v5 doc to inform people about v6 (#7838) @flaviendelangle
|
|
2234
|
+
- [docs] Fix 301 link @oliviertassinari
|
|
2235
|
+
|
|
2236
|
+
### Core
|
|
2237
|
+
|
|
2238
|
+
- [core] Upgrade monorepo (#7849) @cherniavskii
|
|
2239
|
+
|
|
2076
2240
|
## 5.17.22
|
|
2077
2241
|
|
|
2078
2242
|
_Feb 2, 2023_
|
|
@@ -358,6 +358,9 @@ const DateRangeCalendar = /*#__PURE__*/React.forwardRef(function DateRangeCalend
|
|
|
358
358
|
}, (_resolveComponentProp = resolveComponentProps(slotProps == null ? void 0 : slotProps.day, dayOwnerState)) != null ? _resolveComponentProp : {});
|
|
359
359
|
}
|
|
360
360
|
});
|
|
361
|
+
const calendarMonths = React.useMemo(() => Array.from({
|
|
362
|
+
length: calendars
|
|
363
|
+
}).map((_, index) => index), [calendars]);
|
|
361
364
|
const visibleMonths = React.useMemo(() => Array.from({
|
|
362
365
|
length: calendars
|
|
363
366
|
}).map((_, index) => utils.setMonth(calendarState.currentMonth, utils.getMonth(calendarState.currentMonth) + index)), [utils, calendarState.currentMonth, calendars]);
|
|
@@ -389,7 +392,7 @@ const DateRangeCalendar = /*#__PURE__*/React.forwardRef(function DateRangeCalend
|
|
|
389
392
|
children: [/*#__PURE__*/_jsx(Watermark, {
|
|
390
393
|
packageName: "x-date-pickers-pro",
|
|
391
394
|
releaseInfo: releaseInfo
|
|
392
|
-
}),
|
|
395
|
+
}), calendarMonths.map((month, index) => /*#__PURE__*/_jsxs(DateRangeCalendarMonthContainer, {
|
|
393
396
|
className: classes.monthContainer,
|
|
394
397
|
children: [calendars === 1 ? /*#__PURE__*/_jsx(PickersCalendarHeader, {
|
|
395
398
|
views: ['day'],
|
|
@@ -418,7 +421,7 @@ const DateRangeCalendar = /*#__PURE__*/React.forwardRef(function DateRangeCalend
|
|
|
418
421
|
nextLabel: localeText.nextMonth,
|
|
419
422
|
slots: slots,
|
|
420
423
|
slotProps: slotProps,
|
|
421
|
-
children: utils.format(month, 'monthAndYear')
|
|
424
|
+
children: utils.format(visibleMonths[month], 'monthAndYear')
|
|
422
425
|
}), /*#__PURE__*/_jsx(DayCalendarForRange, _extends({
|
|
423
426
|
className: classes.dayCalendar
|
|
424
427
|
}, calendarState, baseDateValidationProps, commonViewProps, {
|
|
@@ -427,7 +430,7 @@ const DateRangeCalendar = /*#__PURE__*/React.forwardRef(function DateRangeCalend
|
|
|
427
430
|
reduceAnimations: reduceAnimations,
|
|
428
431
|
selectedDays: value,
|
|
429
432
|
onSelectedDaysChange: handleSelectedDayChange,
|
|
430
|
-
currentMonth: month,
|
|
433
|
+
currentMonth: visibleMonths[month],
|
|
431
434
|
TransitionProps: CalendarTransitionProps,
|
|
432
435
|
shouldDisableDate: wrappedShouldDisableDate,
|
|
433
436
|
showDaysOutsideCurrentMonth: calendars === 1 && showDaysOutsideCurrentMonth,
|
|
@@ -440,7 +443,7 @@ const DateRangeCalendar = /*#__PURE__*/React.forwardRef(function DateRangeCalend
|
|
|
440
443
|
fixedWeekNumber: fixedWeekNumber,
|
|
441
444
|
displayWeekNumber: displayWeekNumber
|
|
442
445
|
}), index)]
|
|
443
|
-
}, month
|
|
446
|
+
}, month))]
|
|
444
447
|
}));
|
|
445
448
|
});
|
|
446
449
|
process.env.NODE_ENV !== "production" ? DateRangeCalendar.propTypes = {
|
|
@@ -558,10 +561,9 @@ process.env.NODE_ENV !== "production" ? DateRangeCalendar.propTypes = {
|
|
|
558
561
|
*/
|
|
559
562
|
onChange: PropTypes.func,
|
|
560
563
|
/**
|
|
561
|
-
* Callback
|
|
564
|
+
* Callback fired on month change.
|
|
562
565
|
* @template TDate
|
|
563
566
|
* @param {TDate} month The new month.
|
|
564
|
-
* @returns {void|Promise} -
|
|
565
567
|
*/
|
|
566
568
|
onMonthChange: PropTypes.func,
|
|
567
569
|
/**
|
|
@@ -591,7 +593,7 @@ process.env.NODE_ENV !== "production" ? DateRangeCalendar.propTypes = {
|
|
|
591
593
|
*/
|
|
592
594
|
renderLoading: PropTypes.func,
|
|
593
595
|
/**
|
|
594
|
-
* Disable specific date.
|
|
596
|
+
* Disable specific date.
|
|
595
597
|
* @template TDate
|
|
596
598
|
* @param {TDate} day The date to test.
|
|
597
599
|
* @param {string} position The date to test, 'start' or 'end'.
|
|
@@ -48,12 +48,11 @@ export interface ExportedDateRangeCalendarProps<TDate> extends ExportedDayCalend
|
|
|
48
48
|
*/
|
|
49
49
|
reduceAnimations?: boolean;
|
|
50
50
|
/**
|
|
51
|
-
* Callback
|
|
51
|
+
* Callback fired on month change.
|
|
52
52
|
* @template TDate
|
|
53
53
|
* @param {TDate} month The new month.
|
|
54
|
-
* @returns {void|Promise} -
|
|
55
54
|
*/
|
|
56
|
-
onMonthChange?: (month: TDate) => void
|
|
55
|
+
onMonthChange?: (month: TDate) => void;
|
|
57
56
|
/**
|
|
58
57
|
* The number of calendars to render.
|
|
59
58
|
* @default 2
|
|
@@ -168,41 +168,42 @@ process.env.NODE_ENV !== "production" ? DateRangePicker.propTypes = {
|
|
|
168
168
|
minDate: PropTypes.any,
|
|
169
169
|
/**
|
|
170
170
|
* Callback fired when the value is accepted.
|
|
171
|
-
* @template TValue
|
|
171
|
+
* @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.
|
|
172
172
|
* @param {TValue} value The value that was just accepted.
|
|
173
173
|
*/
|
|
174
174
|
onAccept: PropTypes.func,
|
|
175
175
|
/**
|
|
176
176
|
* Callback fired when the value changes.
|
|
177
|
-
* @template TValue,
|
|
177
|
+
* @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.
|
|
178
|
+
* @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.
|
|
178
179
|
* @param {TValue} value The new value.
|
|
179
|
-
* @param {FieldChangeHandlerContext<TError>} The context containing the validation result of the current value.
|
|
180
|
+
* @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
|
|
180
181
|
*/
|
|
181
182
|
onChange: PropTypes.func,
|
|
182
183
|
/**
|
|
183
184
|
* Callback fired when the popup requests to be closed.
|
|
184
|
-
* Use in controlled mode (see open).
|
|
185
|
+
* Use in controlled mode (see `open`).
|
|
185
186
|
*/
|
|
186
187
|
onClose: PropTypes.func,
|
|
187
188
|
/**
|
|
188
189
|
* Callback fired when the error associated to the current value changes.
|
|
189
190
|
* If the error has a non-null value, then the `TextField` will be rendered in `error` state.
|
|
190
191
|
*
|
|
191
|
-
* @template TValue,
|
|
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.
|
|
193
|
+
* @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.
|
|
192
194
|
* @param {TError} error The new error describing why the current value is not valid.
|
|
193
195
|
* @param {TValue} value The value associated to the error.
|
|
194
196
|
*/
|
|
195
197
|
onError: PropTypes.func,
|
|
196
198
|
/**
|
|
197
|
-
* Callback
|
|
199
|
+
* Callback fired on month change.
|
|
198
200
|
* @template TDate
|
|
199
201
|
* @param {TDate} month The new month.
|
|
200
|
-
* @returns {void|Promise} -
|
|
201
202
|
*/
|
|
202
203
|
onMonthChange: PropTypes.func,
|
|
203
204
|
/**
|
|
204
205
|
* Callback fired when the popup requests to be opened.
|
|
205
|
-
* Use in controlled mode (see open).
|
|
206
|
+
* Use in controlled mode (see `open`).
|
|
206
207
|
*/
|
|
207
208
|
onOpen: PropTypes.func,
|
|
208
209
|
/**
|
|
@@ -251,7 +252,7 @@ process.env.NODE_ENV !== "production" ? DateRangePicker.propTypes = {
|
|
|
251
252
|
startIndex: PropTypes.number.isRequired
|
|
252
253
|
})]),
|
|
253
254
|
/**
|
|
254
|
-
* Disable specific date.
|
|
255
|
+
* Disable specific date.
|
|
255
256
|
* @template TDate
|
|
256
257
|
* @param {TDate} day The date to test.
|
|
257
258
|
* @param {string} position The date to test, 'start' or 'end'.
|
|
@@ -176,41 +176,42 @@ DesktopDateRangePicker.propTypes = {
|
|
|
176
176
|
minDate: PropTypes.any,
|
|
177
177
|
/**
|
|
178
178
|
* Callback fired when the value is accepted.
|
|
179
|
-
* @template TValue
|
|
179
|
+
* @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.
|
|
180
180
|
* @param {TValue} value The value that was just accepted.
|
|
181
181
|
*/
|
|
182
182
|
onAccept: PropTypes.func,
|
|
183
183
|
/**
|
|
184
184
|
* Callback fired when the value changes.
|
|
185
|
-
* @template TValue,
|
|
185
|
+
* @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.
|
|
186
|
+
* @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.
|
|
186
187
|
* @param {TValue} value The new value.
|
|
187
|
-
* @param {FieldChangeHandlerContext<TError>} The context containing the validation result of the current value.
|
|
188
|
+
* @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
|
|
188
189
|
*/
|
|
189
190
|
onChange: PropTypes.func,
|
|
190
191
|
/**
|
|
191
192
|
* Callback fired when the popup requests to be closed.
|
|
192
|
-
* Use in controlled mode (see open).
|
|
193
|
+
* Use in controlled mode (see `open`).
|
|
193
194
|
*/
|
|
194
195
|
onClose: PropTypes.func,
|
|
195
196
|
/**
|
|
196
197
|
* Callback fired when the error associated to the current value changes.
|
|
197
198
|
* If the error has a non-null value, then the `TextField` will be rendered in `error` state.
|
|
198
199
|
*
|
|
199
|
-
* @template TValue,
|
|
200
|
+
* @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.
|
|
201
|
+
* @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.
|
|
200
202
|
* @param {TError} error The new error describing why the current value is not valid.
|
|
201
203
|
* @param {TValue} value The value associated to the error.
|
|
202
204
|
*/
|
|
203
205
|
onError: PropTypes.func,
|
|
204
206
|
/**
|
|
205
|
-
* Callback
|
|
207
|
+
* Callback fired on month change.
|
|
206
208
|
* @template TDate
|
|
207
209
|
* @param {TDate} month The new month.
|
|
208
|
-
* @returns {void|Promise} -
|
|
209
210
|
*/
|
|
210
211
|
onMonthChange: PropTypes.func,
|
|
211
212
|
/**
|
|
212
213
|
* Callback fired when the popup requests to be opened.
|
|
213
|
-
* Use in controlled mode (see open).
|
|
214
|
+
* Use in controlled mode (see `open`).
|
|
214
215
|
*/
|
|
215
216
|
onOpen: PropTypes.func,
|
|
216
217
|
/**
|
|
@@ -259,7 +260,7 @@ DesktopDateRangePicker.propTypes = {
|
|
|
259
260
|
startIndex: PropTypes.number.isRequired
|
|
260
261
|
})]),
|
|
261
262
|
/**
|
|
262
|
-
* Disable specific date.
|
|
263
|
+
* Disable specific date.
|
|
263
264
|
* @template TDate
|
|
264
265
|
* @param {TDate} day The date to test.
|
|
265
266
|
* @param {string} position The date to test, 'start' or 'end'.
|
|
@@ -179,41 +179,42 @@ MobileDateRangePicker.propTypes = {
|
|
|
179
179
|
minDate: PropTypes.any,
|
|
180
180
|
/**
|
|
181
181
|
* Callback fired when the value is accepted.
|
|
182
|
-
* @template TValue
|
|
182
|
+
* @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.
|
|
183
183
|
* @param {TValue} value The value that was just accepted.
|
|
184
184
|
*/
|
|
185
185
|
onAccept: PropTypes.func,
|
|
186
186
|
/**
|
|
187
187
|
* Callback fired when the value changes.
|
|
188
|
-
* @template TValue,
|
|
188
|
+
* @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.
|
|
189
|
+
* @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.
|
|
189
190
|
* @param {TValue} value The new value.
|
|
190
|
-
* @param {FieldChangeHandlerContext<TError>} The context containing the validation result of the current value.
|
|
191
|
+
* @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
|
|
191
192
|
*/
|
|
192
193
|
onChange: PropTypes.func,
|
|
193
194
|
/**
|
|
194
195
|
* Callback fired when the popup requests to be closed.
|
|
195
|
-
* Use in controlled mode (see open).
|
|
196
|
+
* Use in controlled mode (see `open`).
|
|
196
197
|
*/
|
|
197
198
|
onClose: PropTypes.func,
|
|
198
199
|
/**
|
|
199
200
|
* Callback fired when the error associated to the current value changes.
|
|
200
201
|
* If the error has a non-null value, then the `TextField` will be rendered in `error` state.
|
|
201
202
|
*
|
|
202
|
-
* @template TValue,
|
|
203
|
+
* @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.
|
|
204
|
+
* @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.
|
|
203
205
|
* @param {TError} error The new error describing why the current value is not valid.
|
|
204
206
|
* @param {TValue} value The value associated to the error.
|
|
205
207
|
*/
|
|
206
208
|
onError: PropTypes.func,
|
|
207
209
|
/**
|
|
208
|
-
* Callback
|
|
210
|
+
* Callback fired on month change.
|
|
209
211
|
* @template TDate
|
|
210
212
|
* @param {TDate} month The new month.
|
|
211
|
-
* @returns {void|Promise} -
|
|
212
213
|
*/
|
|
213
214
|
onMonthChange: PropTypes.func,
|
|
214
215
|
/**
|
|
215
216
|
* Callback fired when the popup requests to be opened.
|
|
216
|
-
* Use in controlled mode (see open).
|
|
217
|
+
* Use in controlled mode (see `open`).
|
|
217
218
|
*/
|
|
218
219
|
onOpen: PropTypes.func,
|
|
219
220
|
/**
|
|
@@ -262,7 +263,7 @@ MobileDateRangePicker.propTypes = {
|
|
|
262
263
|
startIndex: PropTypes.number.isRequired
|
|
263
264
|
})]),
|
|
264
265
|
/**
|
|
265
|
-
* Disable specific date.
|
|
266
|
+
* Disable specific date.
|
|
266
267
|
* @template TDate
|
|
267
268
|
* @param {TDate} day The date to test.
|
|
268
269
|
* @param {string} position The date to test, 'start' or 'end'.
|
|
@@ -138,14 +138,18 @@ const MultiInputDateRangeField = /*#__PURE__*/React.forwardRef(function MultiInp
|
|
|
138
138
|
startDateProps = _objectWithoutPropertiesLoose(_useMultiInputDateRan.startDate, _excluded3),
|
|
139
139
|
endDateProps = _objectWithoutPropertiesLoose(_useMultiInputDateRan.endDate, _excluded2);
|
|
140
140
|
return /*#__PURE__*/_jsxs(Root, _extends({}, rootProps, {
|
|
141
|
-
children: [/*#__PURE__*/_jsx(TextField, _extends({
|
|
141
|
+
children: [/*#__PURE__*/_jsx(TextField, _extends({
|
|
142
|
+
fullWidth: true
|
|
143
|
+
}, startDateProps, {
|
|
142
144
|
inputProps: _extends({}, startDateProps.inputProps, {
|
|
143
145
|
ref: startInputRef,
|
|
144
146
|
readOnly: startReadOnly,
|
|
145
147
|
inputMode: startInputMode,
|
|
146
148
|
onKeyDown: onStartInputKeyDown
|
|
147
149
|
})
|
|
148
|
-
})), /*#__PURE__*/_jsx(Separator, _extends({}, separatorProps)), /*#__PURE__*/_jsx(TextField, _extends({
|
|
150
|
+
})), /*#__PURE__*/_jsx(Separator, _extends({}, separatorProps)), /*#__PURE__*/_jsx(TextField, _extends({
|
|
151
|
+
fullWidth: true
|
|
152
|
+
}, endDateProps, {
|
|
149
153
|
inputProps: _extends({}, endDateProps.inputProps, {
|
|
150
154
|
ref: endInputRef,
|
|
151
155
|
readOnly: endReadOnly,
|
|
@@ -217,14 +221,16 @@ process.env.NODE_ENV !== "production" ? MultiInputDateRangeField.propTypes = {
|
|
|
217
221
|
minDate: PropTypes.any,
|
|
218
222
|
/**
|
|
219
223
|
* Callback fired when the value changes.
|
|
220
|
-
* @template TValue,
|
|
224
|
+
* @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.
|
|
225
|
+
* @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.
|
|
221
226
|
* @param {TValue} value The new value.
|
|
222
|
-
* @param {FieldChangeHandlerContext<TError>} The context containing the validation result of the current value.
|
|
227
|
+
* @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
|
|
223
228
|
*/
|
|
224
229
|
onChange: PropTypes.func,
|
|
225
230
|
/**
|
|
226
231
|
* Callback fired when the error associated to the current value changes.
|
|
227
|
-
* @template TValue,
|
|
232
|
+
* @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.
|
|
233
|
+
* @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.
|
|
228
234
|
* @param {TError} error The new error.
|
|
229
235
|
* @param {TValue} value The value associated to the error.
|
|
230
236
|
*/
|
|
@@ -254,7 +260,7 @@ process.env.NODE_ENV !== "production" ? MultiInputDateRangeField.propTypes = {
|
|
|
254
260
|
startIndex: PropTypes.number.isRequired
|
|
255
261
|
})]),
|
|
256
262
|
/**
|
|
257
|
-
* Disable specific date.
|
|
263
|
+
* Disable specific date.
|
|
258
264
|
* @template TDate
|
|
259
265
|
* @param {TDate} day The date to test.
|
|
260
266
|
* @param {string} position The date to test, 'start' or 'end'.
|
|
@@ -148,14 +148,18 @@ const MultiInputDateTimeRangeField = /*#__PURE__*/React.forwardRef(function Mult
|
|
|
148
148
|
startDateProps = _objectWithoutPropertiesLoose(_useMultiInputDateTim.startDate, _excluded3),
|
|
149
149
|
endDateProps = _objectWithoutPropertiesLoose(_useMultiInputDateTim.endDate, _excluded2);
|
|
150
150
|
return /*#__PURE__*/_jsxs(Root, _extends({}, rootProps, {
|
|
151
|
-
children: [/*#__PURE__*/_jsx(TextField, _extends({
|
|
151
|
+
children: [/*#__PURE__*/_jsx(TextField, _extends({
|
|
152
|
+
fullWidth: true
|
|
153
|
+
}, startDateProps, {
|
|
152
154
|
inputProps: _extends({}, startDateProps.inputProps, {
|
|
153
155
|
ref: startInputRef,
|
|
154
156
|
readOnly: startReadOnly,
|
|
155
157
|
inputMode: startInputMode,
|
|
156
158
|
onKeyDown: onStartInputKeyDown
|
|
157
159
|
})
|
|
158
|
-
})), /*#__PURE__*/_jsx(Separator, _extends({}, separatorProps)), /*#__PURE__*/_jsx(TextField, _extends({
|
|
160
|
+
})), /*#__PURE__*/_jsx(Separator, _extends({}, separatorProps)), /*#__PURE__*/_jsx(TextField, _extends({
|
|
161
|
+
fullWidth: true
|
|
162
|
+
}, endDateProps, {
|
|
159
163
|
inputProps: _extends({}, endDateProps.inputProps, {
|
|
160
164
|
ref: endInputRef,
|
|
161
165
|
readOnly: endReadOnly,
|
|
@@ -259,14 +263,16 @@ process.env.NODE_ENV !== "production" ? MultiInputDateTimeRangeField.propTypes =
|
|
|
259
263
|
minutesStep: PropTypes.number,
|
|
260
264
|
/**
|
|
261
265
|
* Callback fired when the value changes.
|
|
262
|
-
* @template TValue,
|
|
266
|
+
* @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.
|
|
267
|
+
* @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.
|
|
263
268
|
* @param {TValue} value The new value.
|
|
264
|
-
* @param {FieldChangeHandlerContext<TError>} The context containing the validation result of the current value.
|
|
269
|
+
* @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
|
|
265
270
|
*/
|
|
266
271
|
onChange: PropTypes.func,
|
|
267
272
|
/**
|
|
268
273
|
* Callback fired when the error associated to the current value changes.
|
|
269
|
-
* @template TValue,
|
|
274
|
+
* @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.
|
|
275
|
+
* @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.
|
|
270
276
|
* @param {TError} error The new error.
|
|
271
277
|
* @param {TValue} value The value associated to the error.
|
|
272
278
|
*/
|
|
@@ -304,7 +310,7 @@ process.env.NODE_ENV !== "production" ? MultiInputDateTimeRangeField.propTypes =
|
|
|
304
310
|
*/
|
|
305
311
|
shouldDisableClock: PropTypes.func,
|
|
306
312
|
/**
|
|
307
|
-
* Disable specific date.
|
|
313
|
+
* Disable specific date.
|
|
308
314
|
* @template TDate
|
|
309
315
|
* @param {TDate} day The date to test.
|
|
310
316
|
* @param {string} position The date to test, 'start' or 'end'.
|
|
@@ -138,14 +138,18 @@ const MultiInputTimeRangeField = /*#__PURE__*/React.forwardRef(function MultiInp
|
|
|
138
138
|
startDateProps = _objectWithoutPropertiesLoose(_useMultiInputTimeRan.startDate, _excluded3),
|
|
139
139
|
endDateProps = _objectWithoutPropertiesLoose(_useMultiInputTimeRan.endDate, _excluded2);
|
|
140
140
|
return /*#__PURE__*/_jsxs(Root, _extends({}, rootProps, {
|
|
141
|
-
children: [/*#__PURE__*/_jsx(TextField, _extends({
|
|
141
|
+
children: [/*#__PURE__*/_jsx(TextField, _extends({
|
|
142
|
+
fullWidth: true
|
|
143
|
+
}, startDateProps, {
|
|
142
144
|
inputProps: _extends({}, startDateProps.inputProps, {
|
|
143
145
|
ref: startInputRef,
|
|
144
146
|
readOnly: startReadOnly,
|
|
145
147
|
inputMode: startInputMode,
|
|
146
148
|
onKeyDown: onStartInputKeyDown
|
|
147
149
|
})
|
|
148
|
-
})), /*#__PURE__*/_jsx(Separator, _extends({}, separatorProps)), /*#__PURE__*/_jsx(TextField, _extends({
|
|
150
|
+
})), /*#__PURE__*/_jsx(Separator, _extends({}, separatorProps)), /*#__PURE__*/_jsx(TextField, _extends({
|
|
151
|
+
fullWidth: true
|
|
152
|
+
}, endDateProps, {
|
|
149
153
|
inputProps: _extends({}, endDateProps.inputProps, {
|
|
150
154
|
ref: endInputRef,
|
|
151
155
|
readOnly: endReadOnly,
|
|
@@ -233,14 +237,16 @@ process.env.NODE_ENV !== "production" ? MultiInputTimeRangeField.propTypes = {
|
|
|
233
237
|
minutesStep: PropTypes.number,
|
|
234
238
|
/**
|
|
235
239
|
* Callback fired when the value changes.
|
|
236
|
-
* @template TValue,
|
|
240
|
+
* @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.
|
|
241
|
+
* @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.
|
|
237
242
|
* @param {TValue} value The new value.
|
|
238
|
-
* @param {FieldChangeHandlerContext<TError>} The context containing the validation result of the current value.
|
|
243
|
+
* @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
|
|
239
244
|
*/
|
|
240
245
|
onChange: PropTypes.func,
|
|
241
246
|
/**
|
|
242
247
|
* Callback fired when the error associated to the current value changes.
|
|
243
|
-
* @template TValue,
|
|
248
|
+
* @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.
|
|
249
|
+
* @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.
|
|
244
250
|
* @param {TError} error The new error.
|
|
245
251
|
* @param {TValue} value The value associated to the error.
|
|
246
252
|
*/
|
|
@@ -180,14 +180,16 @@ process.env.NODE_ENV !== "production" ? SingleInputDateRangeField.propTypes = {
|
|
|
180
180
|
onBlur: PropTypes.func,
|
|
181
181
|
/**
|
|
182
182
|
* Callback fired when the value changes.
|
|
183
|
-
* @template TValue,
|
|
183
|
+
* @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.
|
|
184
|
+
* @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.
|
|
184
185
|
* @param {TValue} value The new value.
|
|
185
|
-
* @param {FieldChangeHandlerContext<TError>} The context containing the validation result of the current value.
|
|
186
|
+
* @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
|
|
186
187
|
*/
|
|
187
188
|
onChange: PropTypes.func,
|
|
188
189
|
/**
|
|
189
190
|
* Callback fired when the error associated to the current value changes.
|
|
190
|
-
* @template TValue,
|
|
191
|
+
* @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.
|
|
192
|
+
* @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.
|
|
191
193
|
* @param {TError} error The new error.
|
|
192
194
|
* @param {TValue} value The value associated to the error.
|
|
193
195
|
*/
|
|
@@ -223,7 +225,7 @@ process.env.NODE_ENV !== "production" ? SingleInputDateRangeField.propTypes = {
|
|
|
223
225
|
startIndex: PropTypes.number.isRequired
|
|
224
226
|
})]),
|
|
225
227
|
/**
|
|
226
|
-
* Disable specific date.
|
|
228
|
+
* Disable specific date.
|
|
227
229
|
* @template TDate
|
|
228
230
|
* @param {TDate} day The date to test.
|
|
229
231
|
* @param {string} position The date to test, 'start' or 'end'.
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { UseSingleInputDateRangeFieldDefaultizedProps, UseSingleInputDateRangeFieldParams, UseSingleInputDateRangeFieldProps } from './SingleInputDateRangeField.types';
|
|
2
2
|
export declare const useDefaultizedDateRangeFieldProps: <TDate, AdditionalProps extends {}>(props: UseSingleInputDateRangeFieldProps<TDate>) => UseSingleInputDateRangeFieldDefaultizedProps<TDate, AdditionalProps>;
|
|
3
|
-
export declare const useSingleInputDateRangeField: <TDate, TChildProps extends {}>({ props, inputRef, }: UseSingleInputDateRangeFieldParams<TDate, TChildProps>) => import("@mui/x-date-pickers/internals").UseFieldResponse<TChildProps
|
|
3
|
+
export declare const useSingleInputDateRangeField: <TDate, TChildProps extends {}>({ props, inputRef, }: UseSingleInputDateRangeFieldParams<TDate, TChildProps>) => import("@mui/x-date-pickers/internals").UseFieldResponse<Omit<TChildProps, keyof UseSingleInputDateRangeFieldProps<TDate>>>;
|
|
@@ -212,14 +212,16 @@ process.env.NODE_ENV !== "production" ? SingleInputDateTimeRangeField.propTypes
|
|
|
212
212
|
onBlur: PropTypes.func,
|
|
213
213
|
/**
|
|
214
214
|
* Callback fired when the value changes.
|
|
215
|
-
* @template TValue,
|
|
215
|
+
* @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.
|
|
216
|
+
* @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.
|
|
216
217
|
* @param {TValue} value The new value.
|
|
217
|
-
* @param {FieldChangeHandlerContext<TError>} The context containing the validation result of the current value.
|
|
218
|
+
* @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
|
|
218
219
|
*/
|
|
219
220
|
onChange: PropTypes.func,
|
|
220
221
|
/**
|
|
221
222
|
* Callback fired when the error associated to the current value changes.
|
|
222
|
-
* @template TValue,
|
|
223
|
+
* @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.
|
|
224
|
+
* @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.
|
|
223
225
|
* @param {TError} error The new error.
|
|
224
226
|
* @param {TValue} value The value associated to the error.
|
|
225
227
|
*/
|
|
@@ -263,7 +265,7 @@ process.env.NODE_ENV !== "production" ? SingleInputDateTimeRangeField.propTypes
|
|
|
263
265
|
*/
|
|
264
266
|
shouldDisableClock: PropTypes.func,
|
|
265
267
|
/**
|
|
266
|
-
* Disable specific date.
|
|
268
|
+
* Disable specific date.
|
|
267
269
|
* @template TDate
|
|
268
270
|
* @param {TDate} day The date to test.
|
|
269
271
|
* @param {string} position The date to test, 'start' or 'end'.
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { UseSingleInputDateTimeRangeFieldDefaultizedProps, UseSingleInputDateTimeRangeFieldParams, UseSingleInputDateTimeRangeFieldProps } from './SingleInputDateTimeRangeField.types';
|
|
2
2
|
export declare const useDefaultizedTimeRangeFieldProps: <TDate, AdditionalProps extends {}>(props: UseSingleInputDateTimeRangeFieldProps<TDate>) => UseSingleInputDateTimeRangeFieldDefaultizedProps<TDate, AdditionalProps>;
|
|
3
|
-
export declare const useSingleInputDateTimeRangeField: <TDate, TChildProps extends {}>({ props, inputRef, }: UseSingleInputDateTimeRangeFieldParams<TDate, TChildProps>) => import("@mui/x-date-pickers/internals").UseFieldResponse<TChildProps
|
|
3
|
+
export declare const useSingleInputDateTimeRangeField: <TDate, TChildProps extends {}>({ props, inputRef, }: UseSingleInputDateTimeRangeFieldParams<TDate, TChildProps>) => import("@mui/x-date-pickers/internals").UseFieldResponse<Omit<TChildProps, keyof UseSingleInputDateTimeRangeFieldProps<TDate>>>;
|