@mui/lab 5.0.0-alpha.88 → 5.0.0-alpha.91
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/AdapterDateFns/AdapterDateFns.d.ts +3 -0
- package/AdapterDateFns/AdapterDateFns.js +16 -0
- package/AdapterDateFns/index.d.ts +1 -1
- package/AdapterDateFns/index.js +1 -1
- package/AdapterDayjs/AdapterDayjs.d.ts +3 -0
- package/AdapterDayjs/AdapterDayjs.js +16 -0
- package/AdapterDayjs/index.d.ts +1 -1
- package/AdapterDayjs/index.js +1 -1
- package/AdapterLuxon/AdapterLuxon.d.ts +3 -0
- package/AdapterLuxon/AdapterLuxon.js +16 -0
- package/AdapterLuxon/index.d.ts +1 -1
- package/AdapterLuxon/index.js +1 -1
- package/AdapterMoment/AdapterMoment.d.ts +3 -0
- package/AdapterMoment/AdapterMoment.js +16 -0
- package/AdapterMoment/index.d.ts +1 -1
- package/AdapterMoment/index.js +1 -1
- package/CHANGELOG.md +185 -0
- package/CalendarPicker/CalendarPicker.d.ts +5 -1
- package/CalendarPicker/CalendarPicker.js +6 -9
- package/CalendarPicker/index.d.ts +1 -2
- package/CalendarPicker/index.js +1 -1
- package/CalendarPickerSkeleton/CalendarPickerSkeleton.d.ts +4 -1
- package/CalendarPickerSkeleton/CalendarPickerSkeleton.js +10 -23
- package/CalendarPickerSkeleton/index.d.ts +1 -2
- package/CalendarPickerSkeleton/index.js +1 -1
- package/ClockPicker/ClockPicker.d.ts +5 -1
- package/ClockPicker/ClockPicker.js +6 -9
- package/ClockPicker/index.d.ts +1 -2
- package/ClockPicker/index.js +1 -1
- package/DatePicker/DatePicker.d.ts +1 -1
- package/DatePicker/DatePicker.js +4 -448
- package/DatePicker/index.d.ts +1 -1
- package/DatePicker/index.js +2 -1
- package/DateTimePicker/DateTimePicker.d.ts +1 -1
- package/DateTimePicker/DateTimePicker.js +4 -536
- package/DateTimePicker/index.d.ts +1 -1
- package/DateTimePicker/index.js +2 -1
- package/DesktopDatePicker/DesktopDatePicker.d.ts +1 -1
- package/DesktopDatePicker/DesktopDatePicker.js +4 -412
- package/DesktopDatePicker/index.d.ts +1 -1
- package/DesktopDatePicker/index.js +2 -1
- package/DesktopDateTimePicker/DesktopDateTimePicker.d.ts +1 -1
- package/DesktopDateTimePicker/DesktopDateTimePicker.js +4 -500
- package/DesktopDateTimePicker/index.d.ts +1 -1
- package/DesktopDateTimePicker/index.js +2 -1
- package/DesktopTimePicker/DesktopTimePicker.d.ts +1 -1
- package/DesktopTimePicker/DesktopTimePicker.js +4 -330
- package/DesktopTimePicker/index.d.ts +2 -2
- package/DesktopTimePicker/index.js +2 -1
- package/LocalizationProvider/LocalizationProvider.d.ts +1 -1
- package/LocalizationProvider/LocalizationProvider.js +3 -22
- package/LocalizationProvider/index.d.ts +1 -1
- package/LocalizationProvider/index.js +2 -1
- package/Masonry/Masonry.js +14 -7
- package/MobileDatePicker/MobileDatePicker.d.ts +1 -1
- package/MobileDatePicker/MobileDatePicker.js +3 -425
- package/MobileDatePicker/index.d.ts +1 -1
- package/MobileDatePicker/index.js +2 -1
- package/MobileDateTimePicker/MobileDateTimePicker.d.ts +1 -1
- package/MobileDateTimePicker/MobileDateTimePicker.js +4 -514
- package/MobileDateTimePicker/index.d.ts +1 -1
- package/MobileDateTimePicker/index.js +2 -1
- package/MobileTimePicker/MobileTimePicker.d.ts +1 -1
- package/MobileTimePicker/MobileTimePicker.js +4 -344
- package/MobileTimePicker/index.d.ts +1 -1
- package/MobileTimePicker/index.js +2 -1
- package/MonthPicker/MonthPicker.d.ts +4 -1
- package/MonthPicker/MonthPicker.js +10 -9
- package/MonthPicker/index.d.ts +1 -2
- package/MonthPicker/index.js +1 -1
- package/PickersDay/PickersDay.d.ts +4 -1
- package/PickersDay/PickersDay.js +10 -23
- package/PickersDay/index.d.ts +1 -2
- package/PickersDay/index.js +1 -1
- package/StaticDatePicker/StaticDatePicker.d.ts +1 -1
- package/StaticDatePicker/StaticDatePicker.js +4 -386
- package/StaticDatePicker/index.d.ts +1 -1
- package/StaticDatePicker/index.js +2 -1
- package/StaticDateTimePicker/StaticDateTimePicker.d.ts +1 -1
- package/StaticDateTimePicker/StaticDateTimePicker.js +4 -474
- package/StaticDateTimePicker/index.d.ts +1 -1
- package/StaticDateTimePicker/index.js +2 -1
- package/StaticTimePicker/StaticTimePicker.d.ts +1 -1
- package/StaticTimePicker/StaticTimePicker.js +4 -304
- package/StaticTimePicker/index.d.ts +2 -2
- package/StaticTimePicker/index.js +2 -1
- package/TimePicker/TimePicker.d.ts +1 -1
- package/TimePicker/TimePicker.js +4 -366
- package/TimePicker/index.d.ts +1 -1
- package/TimePicker/index.js +2 -1
- package/Timeline/Timeline.d.ts +1 -1
- package/TimelineDot/TimelineDot.d.ts +6 -1
- package/TimelineDot/TimelineDot.js +3 -1
- package/YearPicker/YearPicker.d.ts +5 -1
- package/YearPicker/YearPicker.js +10 -8
- package/YearPicker/index.d.ts +2 -2
- package/YearPicker/index.js +2 -1
- package/index.js +1 -1
- package/legacy/AdapterDateFns/AdapterDateFns.js +19 -0
- package/legacy/AdapterDateFns/index.js +1 -1
- package/legacy/AdapterDayjs/AdapterDayjs.js +19 -0
- package/legacy/AdapterDayjs/index.js +1 -1
- package/legacy/AdapterLuxon/AdapterLuxon.js +19 -0
- package/legacy/AdapterLuxon/index.js +1 -1
- package/legacy/AdapterMoment/AdapterMoment.js +19 -0
- package/legacy/AdapterMoment/index.js +1 -1
- package/legacy/CalendarPicker/CalendarPicker.js +6 -9
- package/legacy/CalendarPicker/index.js +1 -1
- package/legacy/CalendarPickerSkeleton/CalendarPickerSkeleton.js +10 -23
- package/legacy/CalendarPickerSkeleton/index.js +1 -1
- package/legacy/ClockPicker/ClockPicker.js +6 -9
- package/legacy/ClockPicker/index.js +1 -1
- package/legacy/DatePicker/DatePicker.js +4 -448
- package/legacy/DatePicker/index.js +2 -1
- package/legacy/DateTimePicker/DateTimePicker.js +4 -536
- package/legacy/DateTimePicker/index.js +2 -1
- package/legacy/DesktopDatePicker/DesktopDatePicker.js +4 -412
- package/legacy/DesktopDatePicker/index.js +2 -1
- package/legacy/DesktopDateTimePicker/DesktopDateTimePicker.js +4 -500
- package/legacy/DesktopDateTimePicker/index.js +2 -1
- package/legacy/DesktopTimePicker/DesktopTimePicker.js +4 -330
- package/legacy/DesktopTimePicker/index.js +2 -1
- package/legacy/LocalizationProvider/LocalizationProvider.js +3 -22
- package/legacy/LocalizationProvider/index.js +2 -1
- package/legacy/Masonry/Masonry.js +14 -7
- package/legacy/MobileDatePicker/MobileDatePicker.js +3 -425
- package/legacy/MobileDatePicker/index.js +2 -1
- package/legacy/MobileDateTimePicker/MobileDateTimePicker.js +4 -514
- package/legacy/MobileDateTimePicker/index.js +2 -1
- package/legacy/MobileTimePicker/MobileTimePicker.js +4 -344
- package/legacy/MobileTimePicker/index.js +2 -1
- package/legacy/MonthPicker/MonthPicker.js +10 -9
- package/legacy/MonthPicker/index.js +1 -1
- package/legacy/PickersDay/PickersDay.js +10 -23
- package/legacy/PickersDay/index.js +1 -1
- package/legacy/StaticDatePicker/StaticDatePicker.js +4 -386
- package/legacy/StaticDatePicker/index.js +2 -1
- package/legacy/StaticDateTimePicker/StaticDateTimePicker.js +4 -474
- package/legacy/StaticDateTimePicker/index.js +2 -1
- package/legacy/StaticTimePicker/StaticTimePicker.js +4 -304
- package/legacy/StaticTimePicker/index.js +2 -1
- package/legacy/TimePicker/TimePicker.js +4 -366
- package/legacy/TimePicker/index.js +2 -1
- package/legacy/TimelineDot/TimelineDot.js +3 -1
- package/legacy/YearPicker/YearPicker.js +10 -8
- package/legacy/YearPicker/index.js +2 -1
- package/legacy/index.js +1 -1
- package/modern/AdapterDateFns/AdapterDateFns.js +16 -0
- package/modern/AdapterDateFns/index.js +1 -1
- package/modern/AdapterDayjs/AdapterDayjs.js +16 -0
- package/modern/AdapterDayjs/index.js +1 -1
- package/modern/AdapterLuxon/AdapterLuxon.js +16 -0
- package/modern/AdapterLuxon/index.js +1 -1
- package/modern/AdapterMoment/AdapterMoment.js +16 -0
- package/modern/AdapterMoment/index.js +1 -1
- package/modern/CalendarPicker/CalendarPicker.js +6 -9
- package/modern/CalendarPicker/index.js +1 -1
- package/modern/CalendarPickerSkeleton/CalendarPickerSkeleton.js +10 -23
- package/modern/CalendarPickerSkeleton/index.js +1 -1
- package/modern/ClockPicker/ClockPicker.js +6 -9
- package/modern/ClockPicker/index.js +1 -1
- package/modern/DatePicker/DatePicker.js +4 -448
- package/modern/DatePicker/index.js +2 -1
- package/modern/DateTimePicker/DateTimePicker.js +4 -536
- package/modern/DateTimePicker/index.js +2 -1
- package/modern/DesktopDatePicker/DesktopDatePicker.js +4 -412
- package/modern/DesktopDatePicker/index.js +2 -1
- package/modern/DesktopDateTimePicker/DesktopDateTimePicker.js +4 -500
- package/modern/DesktopDateTimePicker/index.js +2 -1
- package/modern/DesktopTimePicker/DesktopTimePicker.js +4 -330
- package/modern/DesktopTimePicker/index.js +2 -1
- package/modern/LocalizationProvider/LocalizationProvider.js +3 -22
- package/modern/LocalizationProvider/index.js +2 -1
- package/modern/Masonry/Masonry.js +14 -7
- package/modern/MobileDatePicker/MobileDatePicker.js +3 -425
- package/modern/MobileDatePicker/index.js +2 -1
- package/modern/MobileDateTimePicker/MobileDateTimePicker.js +4 -514
- package/modern/MobileDateTimePicker/index.js +2 -1
- package/modern/MobileTimePicker/MobileTimePicker.js +4 -344
- package/modern/MobileTimePicker/index.js +2 -1
- package/modern/MonthPicker/MonthPicker.js +10 -9
- package/modern/MonthPicker/index.js +1 -1
- package/modern/PickersDay/PickersDay.js +10 -23
- package/modern/PickersDay/index.js +1 -1
- package/modern/StaticDatePicker/StaticDatePicker.js +4 -386
- package/modern/StaticDatePicker/index.js +2 -1
- package/modern/StaticDateTimePicker/StaticDateTimePicker.js +4 -474
- package/modern/StaticDateTimePicker/index.js +2 -1
- package/modern/StaticTimePicker/StaticTimePicker.js +4 -304
- package/modern/StaticTimePicker/index.js +2 -1
- package/modern/TimePicker/TimePicker.js +4 -366
- package/modern/TimePicker/index.js +2 -1
- package/modern/TimelineDot/TimelineDot.js +3 -1
- package/modern/YearPicker/YearPicker.js +10 -8
- package/modern/YearPicker/index.js +2 -1
- package/modern/index.js +1 -1
- package/node/AdapterDateFns/AdapterDateFns.js +24 -0
- package/node/AdapterDateFns/index.js +4 -2
- package/node/AdapterDayjs/AdapterDayjs.js +24 -0
- package/node/AdapterDayjs/index.js +4 -2
- package/node/AdapterLuxon/AdapterLuxon.js +24 -0
- package/node/AdapterLuxon/index.js +4 -2
- package/node/AdapterMoment/AdapterMoment.js +24 -0
- package/node/AdapterMoment/index.js +4 -2
- package/node/CalendarPicker/CalendarPicker.js +8 -15
- package/node/CalendarPicker/index.js +17 -10
- package/node/CalendarPickerSkeleton/CalendarPickerSkeleton.js +15 -30
- package/node/CalendarPickerSkeleton/index.js +16 -15
- package/node/ClockPicker/ClockPicker.js +8 -15
- package/node/ClockPicker/index.js +17 -10
- package/node/DatePicker/DatePicker.js +4 -454
- package/node/DatePicker/index.js +18 -3
- package/node/DateTimePicker/DateTimePicker.js +4 -542
- package/node/DateTimePicker/index.js +18 -3
- package/node/DesktopDatePicker/DesktopDatePicker.js +4 -418
- package/node/DesktopDatePicker/index.js +18 -3
- package/node/DesktopDateTimePicker/DesktopDateTimePicker.js +4 -506
- package/node/DesktopDateTimePicker/index.js +18 -3
- package/node/DesktopTimePicker/DesktopTimePicker.js +4 -336
- package/node/DesktopTimePicker/index.js +19 -2
- package/node/LocalizationProvider/LocalizationProvider.js +3 -28
- package/node/LocalizationProvider/index.js +18 -3
- package/node/Masonry/Masonry.js +14 -7
- package/node/MobileDatePicker/MobileDatePicker.js +3 -431
- package/node/MobileDatePicker/index.js +18 -3
- package/node/MobileDateTimePicker/MobileDateTimePicker.js +4 -520
- package/node/MobileDateTimePicker/index.js +18 -3
- package/node/MobileTimePicker/MobileTimePicker.js +4 -350
- package/node/MobileTimePicker/index.js +18 -3
- package/node/MonthPicker/MonthPicker.js +15 -15
- package/node/MonthPicker/index.js +16 -15
- package/node/PickersDay/PickersDay.js +15 -30
- package/node/PickersDay/index.js +16 -15
- package/node/StaticDatePicker/StaticDatePicker.js +4 -392
- package/node/StaticDatePicker/index.js +18 -3
- package/node/StaticDateTimePicker/StaticDateTimePicker.js +4 -480
- package/node/StaticDateTimePicker/index.js +18 -3
- package/node/StaticTimePicker/StaticTimePicker.js +4 -310
- package/node/StaticTimePicker/index.js +19 -2
- package/node/TimePicker/TimePicker.js +4 -372
- package/node/TimePicker/index.js +18 -3
- package/node/TimelineDot/TimelineDot.js +3 -1
- package/node/YearPicker/YearPicker.js +15 -19
- package/node/YearPicker/index.js +18 -13
- package/node/index.js +1 -1
- package/package.json +6 -25
- package/themeAugmentation/index.d.ts +0 -2
package/DatePicker/DatePicker.js
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import PropTypes from 'prop-types';
|
|
4
|
-
import { DatePicker as XDatePicker } from '@mui/x-date-pickers/DatePicker';
|
|
5
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
3
|
let warnedOnce = false;
|
|
7
4
|
|
|
8
5
|
const warn = () => {
|
|
9
6
|
if (!warnedOnce) {
|
|
10
|
-
console.warn(['MUI: The DatePicker component was moved from `@mui/lab` to `@mui/x-date-pickers`.', '
|
|
7
|
+
console.warn(['MUI: The DatePicker component was moved from `@mui/lab` to `@mui/x-date-pickers`.', '', "You should use `import { DatePicker } from '@mui/x-date-pickers'`", "or `import { DatePicker } from '@mui/x-date-pickers/DatePicker'`", '', 'More information about this migration on our blog: https://mui.com/blog/lab-date-pickers-to-mui-x/.'].join('\n'));
|
|
11
8
|
warnedOnce = true;
|
|
12
9
|
}
|
|
13
10
|
};
|
|
@@ -15,449 +12,8 @@ const warn = () => {
|
|
|
15
12
|
/**
|
|
16
13
|
* @ignore - do not document.
|
|
17
14
|
*/
|
|
18
|
-
const DatePicker = /*#__PURE__*/React.forwardRef(function DeprecatedDatePicker(
|
|
15
|
+
const DatePicker = /*#__PURE__*/React.forwardRef(function DeprecatedDatePicker() {
|
|
19
16
|
warn();
|
|
20
|
-
return
|
|
21
|
-
ref: ref
|
|
22
|
-
}, props));
|
|
17
|
+
return null;
|
|
23
18
|
});
|
|
24
|
-
process.env.NODE_ENV !== "production" ? DatePicker.propTypes
|
|
25
|
-
/* remove-proptypes */
|
|
26
|
-
= {
|
|
27
|
-
// ----------------------------- Warning --------------------------------
|
|
28
|
-
// | These PropTypes are generated from the TypeScript type definitions |
|
|
29
|
-
// | To update them edit TypeScript types and run "yarn proptypes" |
|
|
30
|
-
// ----------------------------------------------------------------------
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Regular expression to detect "accepted" symbols.
|
|
34
|
-
* @default /\dap/gi
|
|
35
|
-
*/
|
|
36
|
-
acceptRegex: PropTypes.instanceOf(RegExp),
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* If `true`, `onChange` is fired on click even if the same date is selected.
|
|
40
|
-
* @default false
|
|
41
|
-
*/
|
|
42
|
-
allowSameDateSelection: PropTypes.bool,
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* @ignore
|
|
46
|
-
*/
|
|
47
|
-
autoFocus: PropTypes.bool,
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Cancel text message.
|
|
51
|
-
* @default 'Cancel'
|
|
52
|
-
*/
|
|
53
|
-
cancelText: PropTypes.node,
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* @ignore
|
|
57
|
-
*/
|
|
58
|
-
children: PropTypes.node,
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* className applied to the root component.
|
|
62
|
-
*/
|
|
63
|
-
className: PropTypes.string,
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* If `true`, it shows the clear action in the picker dialog.
|
|
67
|
-
* @default false
|
|
68
|
-
*/
|
|
69
|
-
clearable: PropTypes.bool,
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* Clear text message.
|
|
73
|
-
* @default 'Clear'
|
|
74
|
-
*/
|
|
75
|
-
clearText: PropTypes.node,
|
|
76
|
-
|
|
77
|
-
/**
|
|
78
|
-
* The components used for each slot.
|
|
79
|
-
* Either a string to use an HTML element or a component.
|
|
80
|
-
* @default {}
|
|
81
|
-
*/
|
|
82
|
-
components: PropTypes.shape({
|
|
83
|
-
LeftArrowButton: PropTypes.elementType,
|
|
84
|
-
LeftArrowIcon: PropTypes.elementType,
|
|
85
|
-
OpenPickerIcon: PropTypes.elementType,
|
|
86
|
-
RightArrowButton: PropTypes.elementType,
|
|
87
|
-
RightArrowIcon: PropTypes.elementType,
|
|
88
|
-
SwitchViewButton: PropTypes.elementType,
|
|
89
|
-
SwitchViewIcon: PropTypes.elementType
|
|
90
|
-
}),
|
|
91
|
-
|
|
92
|
-
/**
|
|
93
|
-
* The props used for each slot inside.
|
|
94
|
-
* @default {}
|
|
95
|
-
*/
|
|
96
|
-
componentsProps: PropTypes.shape({
|
|
97
|
-
leftArrowButton: PropTypes.object,
|
|
98
|
-
rightArrowButton: PropTypes.object,
|
|
99
|
-
switchViewButton: PropTypes.object
|
|
100
|
-
}),
|
|
101
|
-
|
|
102
|
-
/**
|
|
103
|
-
* Default calendar month displayed when `value={null}`.
|
|
104
|
-
*/
|
|
105
|
-
defaultCalendarMonth: PropTypes.any,
|
|
106
|
-
|
|
107
|
-
/**
|
|
108
|
-
* CSS media query when `Mobile` mode will be changed to `Desktop`.
|
|
109
|
-
* @default '@media (pointer: fine)'
|
|
110
|
-
* @example '@media (min-width: 720px)' or theme.breakpoints.up("sm")
|
|
111
|
-
*/
|
|
112
|
-
desktopModeMediaQuery: PropTypes.string,
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* Props applied to the [`Dialog`](https://mui.com/material-ui/api/dialog/) element.
|
|
116
|
-
*/
|
|
117
|
-
DialogProps: PropTypes.object,
|
|
118
|
-
|
|
119
|
-
/**
|
|
120
|
-
* If `true` the popup or dialog will immediately close after submitting full date.
|
|
121
|
-
* @default `true` for Desktop, `false` for Mobile (based on the chosen wrapper and `desktopModeMediaQuery` prop).
|
|
122
|
-
*/
|
|
123
|
-
disableCloseOnSelect: PropTypes.bool,
|
|
124
|
-
|
|
125
|
-
/**
|
|
126
|
-
* If `true`, the picker and text field are disabled.
|
|
127
|
-
* @default false
|
|
128
|
-
*/
|
|
129
|
-
disabled: PropTypes.bool,
|
|
130
|
-
|
|
131
|
-
/**
|
|
132
|
-
* @default false
|
|
133
|
-
*/
|
|
134
|
-
disableFuture: PropTypes.bool,
|
|
135
|
-
|
|
136
|
-
/**
|
|
137
|
-
* If `true`, todays date is rendering without highlighting with circle.
|
|
138
|
-
* @default false
|
|
139
|
-
*/
|
|
140
|
-
disableHighlightToday: PropTypes.bool,
|
|
141
|
-
|
|
142
|
-
/**
|
|
143
|
-
* Disable mask on the keyboard, this should be used rarely. Consider passing proper mask for your format.
|
|
144
|
-
* @default false
|
|
145
|
-
*/
|
|
146
|
-
disableMaskedInput: PropTypes.bool,
|
|
147
|
-
|
|
148
|
-
/**
|
|
149
|
-
* Do not render open picker button (renders only text field with validation).
|
|
150
|
-
* @default false
|
|
151
|
-
*/
|
|
152
|
-
disableOpenPicker: PropTypes.bool,
|
|
153
|
-
|
|
154
|
-
/**
|
|
155
|
-
* @default false
|
|
156
|
-
*/
|
|
157
|
-
disablePast: PropTypes.bool,
|
|
158
|
-
|
|
159
|
-
/**
|
|
160
|
-
* Get aria-label text for control that opens picker dialog. Aria-label text must include selected date. @DateIOType
|
|
161
|
-
* @template TDateValue
|
|
162
|
-
* @param {ParseableDate<TDateValue>} value The date from which we want to add an aria-text.
|
|
163
|
-
* @param {MuiPickersAdapter<TDateValue>} utils The utils to manipulate the date.
|
|
164
|
-
* @returns {string} The aria-text to render inside the dialog.
|
|
165
|
-
* @default (value, utils) => `Choose date, selected date is ${utils.format(utils.date(value), 'fullDate')}`
|
|
166
|
-
*/
|
|
167
|
-
getOpenDialogAriaText: PropTypes.func,
|
|
168
|
-
|
|
169
|
-
/**
|
|
170
|
-
* Get aria-label text for switching between views button.
|
|
171
|
-
* @param {CalendarPickerView} currentView The view from which we want to get the button text.
|
|
172
|
-
* @returns {string} The label of the view.
|
|
173
|
-
*/
|
|
174
|
-
getViewSwitchingButtonText: PropTypes.func,
|
|
175
|
-
|
|
176
|
-
/**
|
|
177
|
-
* @ignore
|
|
178
|
-
*/
|
|
179
|
-
ignoreInvalidInputs: PropTypes.bool,
|
|
180
|
-
|
|
181
|
-
/**
|
|
182
|
-
* Props to pass to keyboard input adornment.
|
|
183
|
-
*/
|
|
184
|
-
InputAdornmentProps: PropTypes.object,
|
|
185
|
-
|
|
186
|
-
/**
|
|
187
|
-
* Format string.
|
|
188
|
-
*/
|
|
189
|
-
inputFormat: PropTypes.string,
|
|
190
|
-
|
|
191
|
-
/**
|
|
192
|
-
* @ignore
|
|
193
|
-
*/
|
|
194
|
-
InputProps: PropTypes.object,
|
|
195
|
-
|
|
196
|
-
/**
|
|
197
|
-
* Pass a ref to the `input` element.
|
|
198
|
-
*/
|
|
199
|
-
inputRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
|
|
200
|
-
current: PropTypes.object
|
|
201
|
-
})]),
|
|
202
|
-
|
|
203
|
-
/**
|
|
204
|
-
* @ignore
|
|
205
|
-
*/
|
|
206
|
-
label: PropTypes.node,
|
|
207
|
-
|
|
208
|
-
/**
|
|
209
|
-
* Left arrow icon aria-label text.
|
|
210
|
-
*/
|
|
211
|
-
leftArrowButtonText: PropTypes.string,
|
|
212
|
-
|
|
213
|
-
/**
|
|
214
|
-
* If `true` renders `LoadingComponent` in calendar instead of calendar view.
|
|
215
|
-
* Can be used to preload information and show it in calendar.
|
|
216
|
-
* @default false
|
|
217
|
-
*/
|
|
218
|
-
loading: PropTypes.bool,
|
|
219
|
-
|
|
220
|
-
/**
|
|
221
|
-
* Custom mask. Can be used to override generate from format. (e.g. `__/__/____ __:__` or `__/__/____ __:__ _M`).
|
|
222
|
-
*/
|
|
223
|
-
mask: PropTypes.string,
|
|
224
|
-
|
|
225
|
-
/**
|
|
226
|
-
* Max selectable date. @DateIOType
|
|
227
|
-
*/
|
|
228
|
-
maxDate: PropTypes.any,
|
|
229
|
-
|
|
230
|
-
/**
|
|
231
|
-
* Min selectable date. @DateIOType
|
|
232
|
-
*/
|
|
233
|
-
minDate: PropTypes.any,
|
|
234
|
-
|
|
235
|
-
/**
|
|
236
|
-
* Ok button text.
|
|
237
|
-
* @default 'OK'
|
|
238
|
-
*/
|
|
239
|
-
okText: PropTypes.node,
|
|
240
|
-
|
|
241
|
-
/**
|
|
242
|
-
* Callback fired when date is accepted @DateIOType.
|
|
243
|
-
* @template TDateValue
|
|
244
|
-
* @param {TDateValue} date The date that was just accepted.
|
|
245
|
-
*/
|
|
246
|
-
onAccept: PropTypes.func,
|
|
247
|
-
|
|
248
|
-
/**
|
|
249
|
-
* Callback fired when the value (the selected date) changes @DateIOType.
|
|
250
|
-
* @template TDate
|
|
251
|
-
* @param {DateRange<TDate>} date The new parsed date.
|
|
252
|
-
* @param {string} keyboardInputValue The current value of the keyboard input.
|
|
253
|
-
*/
|
|
254
|
-
onChange: PropTypes.func.isRequired,
|
|
255
|
-
|
|
256
|
-
/**
|
|
257
|
-
* Callback fired when the popup requests to be closed.
|
|
258
|
-
* Use in controlled mode (see open).
|
|
259
|
-
*/
|
|
260
|
-
onClose: PropTypes.func,
|
|
261
|
-
|
|
262
|
-
/**
|
|
263
|
-
* Callback that fired when input value or new `value` prop validation returns **new** validation error (or value is valid after error).
|
|
264
|
-
* In case of validation error detected `reason` prop return non-null value and `TextField` must be displayed in `error` state.
|
|
265
|
-
* This can be used to render appropriate form error.
|
|
266
|
-
*
|
|
267
|
-
* [Read the guide](https://next.material-ui-pickers.dev/guides/forms) about form integration and error displaying.
|
|
268
|
-
* @DateIOType
|
|
269
|
-
*
|
|
270
|
-
* @template TError, TDateValue
|
|
271
|
-
* @param {TError} reason The reason why the current value is not valid.
|
|
272
|
-
* @param {TDateValue} value The invalid value.
|
|
273
|
-
*/
|
|
274
|
-
onError: PropTypes.func,
|
|
275
|
-
|
|
276
|
-
/**
|
|
277
|
-
* Callback firing on month change. @DateIOType
|
|
278
|
-
* @template TDate
|
|
279
|
-
* @param {TDate} month The new month.
|
|
280
|
-
*/
|
|
281
|
-
onMonthChange: PropTypes.func,
|
|
282
|
-
|
|
283
|
-
/**
|
|
284
|
-
* Callback fired when the popup requests to be opened.
|
|
285
|
-
* Use in controlled mode (see open).
|
|
286
|
-
*/
|
|
287
|
-
onOpen: PropTypes.func,
|
|
288
|
-
|
|
289
|
-
/**
|
|
290
|
-
* Callback fired on view change.
|
|
291
|
-
* @param {CalendarPickerView} view The new view.
|
|
292
|
-
*/
|
|
293
|
-
onViewChange: PropTypes.func,
|
|
294
|
-
|
|
295
|
-
/**
|
|
296
|
-
* Callback firing on year change @DateIOType.
|
|
297
|
-
* @template TDate
|
|
298
|
-
* @param {TDate} year The new year.
|
|
299
|
-
*/
|
|
300
|
-
onYearChange: PropTypes.func,
|
|
301
|
-
|
|
302
|
-
/**
|
|
303
|
-
* Control the popup or dialog open state.
|
|
304
|
-
*/
|
|
305
|
-
open: PropTypes.bool,
|
|
306
|
-
|
|
307
|
-
/**
|
|
308
|
-
* Props to pass to keyboard adornment button.
|
|
309
|
-
*/
|
|
310
|
-
OpenPickerButtonProps: PropTypes.object,
|
|
311
|
-
|
|
312
|
-
/**
|
|
313
|
-
* First view to show.
|
|
314
|
-
*/
|
|
315
|
-
openTo: PropTypes.oneOf(['day', 'month', 'year']),
|
|
316
|
-
|
|
317
|
-
/**
|
|
318
|
-
* Force rendering in particular orientation.
|
|
319
|
-
*/
|
|
320
|
-
orientation: PropTypes.oneOf(['landscape', 'portrait']),
|
|
321
|
-
|
|
322
|
-
/**
|
|
323
|
-
* Paper props passed down to [Paper](https://mui.com/material-ui/api/paper/) component.
|
|
324
|
-
*/
|
|
325
|
-
PaperProps: PropTypes.object,
|
|
326
|
-
|
|
327
|
-
/**
|
|
328
|
-
* Popper props passed down to [Popper](https://mui.com/material-ui/api/popper/) component.
|
|
329
|
-
*/
|
|
330
|
-
PopperProps: PropTypes.object,
|
|
331
|
-
|
|
332
|
-
/**
|
|
333
|
-
* Make picker read only.
|
|
334
|
-
* @default false
|
|
335
|
-
*/
|
|
336
|
-
readOnly: PropTypes.bool,
|
|
337
|
-
|
|
338
|
-
/**
|
|
339
|
-
* Disable heavy animations.
|
|
340
|
-
* @default typeof navigator !== 'undefined' && /(android)/i.test(navigator.userAgent)
|
|
341
|
-
*/
|
|
342
|
-
reduceAnimations: PropTypes.bool,
|
|
343
|
-
|
|
344
|
-
/**
|
|
345
|
-
* Custom renderer for day. Check the [PickersDay](https://mui.com/x/api/date-pickers/pickers-day/) component.
|
|
346
|
-
* @template TDate
|
|
347
|
-
* @param {TDate} day The day to render.
|
|
348
|
-
* @param {Array<TDate | null>} selectedDates The dates currently selected.
|
|
349
|
-
* @param {PickersDayProps<TDate>} pickersDayProps The props of the day to render.
|
|
350
|
-
* @returns {JSX.Element} The element representing the day.
|
|
351
|
-
*/
|
|
352
|
-
renderDay: PropTypes.func,
|
|
353
|
-
|
|
354
|
-
/**
|
|
355
|
-
* The `renderInput` prop allows you to customize the rendered input.
|
|
356
|
-
* The `props` argument of this render prop contains props of [TextField](https://mui.com/material-ui/api/text-field/#props) that you need to forward.
|
|
357
|
-
* Pay specific attention to the `ref` and `inputProps` keys.
|
|
358
|
-
* @example ```jsx
|
|
359
|
-
* renderInput={props => <TextField {...props} />}
|
|
360
|
-
* ````
|
|
361
|
-
* @param {MuiTextFieldPropsType} props The props of the input.
|
|
362
|
-
* @returns {React.ReactNode} The node to render as the input.
|
|
363
|
-
*/
|
|
364
|
-
renderInput: PropTypes.func.isRequired,
|
|
365
|
-
|
|
366
|
-
/**
|
|
367
|
-
* Component displaying when passed `loading` true.
|
|
368
|
-
* @returns {React.ReactNode} The node to render when loading.
|
|
369
|
-
* @default () => <span data-mui-test="loading-progress">...</span>
|
|
370
|
-
*/
|
|
371
|
-
renderLoading: PropTypes.func,
|
|
372
|
-
|
|
373
|
-
/**
|
|
374
|
-
* Custom formatter to be passed into Rifm component.
|
|
375
|
-
* @param {string} str The un-formatted string.
|
|
376
|
-
* @returns {string} The formatted string.
|
|
377
|
-
*/
|
|
378
|
-
rifmFormatter: PropTypes.func,
|
|
379
|
-
|
|
380
|
-
/**
|
|
381
|
-
* Right arrow icon aria-label text.
|
|
382
|
-
*/
|
|
383
|
-
rightArrowButtonText: PropTypes.string,
|
|
384
|
-
|
|
385
|
-
/**
|
|
386
|
-
* Disable specific date. @DateIOType
|
|
387
|
-
* @template TDate
|
|
388
|
-
* @param {TDate} day The date to check.
|
|
389
|
-
* @returns {boolean} If `true` the day will be disabled.
|
|
390
|
-
*/
|
|
391
|
-
shouldDisableDate: PropTypes.func,
|
|
392
|
-
|
|
393
|
-
/**
|
|
394
|
-
* Disable specific years dynamically.
|
|
395
|
-
* Works like `shouldDisableDate` but for year selection view @DateIOType.
|
|
396
|
-
* @template TDate
|
|
397
|
-
* @param {TDate} year The year to test.
|
|
398
|
-
* @returns {boolean} Return `true` if the year should be disabled.
|
|
399
|
-
*/
|
|
400
|
-
shouldDisableYear: PropTypes.func,
|
|
401
|
-
|
|
402
|
-
/**
|
|
403
|
-
* If `true`, days that have `outsideCurrentMonth={true}` are displayed.
|
|
404
|
-
* @default false
|
|
405
|
-
*/
|
|
406
|
-
showDaysOutsideCurrentMonth: PropTypes.bool,
|
|
407
|
-
|
|
408
|
-
/**
|
|
409
|
-
* If `true`, the today button is displayed. **Note** that `showClearButton` has a higher priority.
|
|
410
|
-
* @default false
|
|
411
|
-
*/
|
|
412
|
-
showTodayButton: PropTypes.bool,
|
|
413
|
-
|
|
414
|
-
/**
|
|
415
|
-
* If `true`, show the toolbar even in desktop mode.
|
|
416
|
-
*/
|
|
417
|
-
showToolbar: PropTypes.bool,
|
|
418
|
-
|
|
419
|
-
/**
|
|
420
|
-
* Today text message.
|
|
421
|
-
* @default 'Today'
|
|
422
|
-
*/
|
|
423
|
-
todayText: PropTypes.node,
|
|
424
|
-
|
|
425
|
-
/**
|
|
426
|
-
* Component that will replace default toolbar renderer.
|
|
427
|
-
* @default DatePickerToolbar
|
|
428
|
-
*/
|
|
429
|
-
ToolbarComponent: PropTypes.elementType,
|
|
430
|
-
|
|
431
|
-
/**
|
|
432
|
-
* Date format, that is displaying in toolbar.
|
|
433
|
-
*/
|
|
434
|
-
toolbarFormat: PropTypes.string,
|
|
435
|
-
|
|
436
|
-
/**
|
|
437
|
-
* Mobile picker date value placeholder, displaying if `value` === `null`.
|
|
438
|
-
* @default '–'
|
|
439
|
-
*/
|
|
440
|
-
toolbarPlaceholder: PropTypes.node,
|
|
441
|
-
|
|
442
|
-
/**
|
|
443
|
-
* Mobile picker title, displaying in the toolbar.
|
|
444
|
-
* @default 'Select date'
|
|
445
|
-
*/
|
|
446
|
-
toolbarTitle: PropTypes.node,
|
|
447
|
-
|
|
448
|
-
/**
|
|
449
|
-
* Custom component for popper [Transition](https://mui.com/material-ui/transitions/#transitioncomponent-prop).
|
|
450
|
-
*/
|
|
451
|
-
TransitionComponent: PropTypes.elementType,
|
|
452
|
-
|
|
453
|
-
/**
|
|
454
|
-
* The value of the picker.
|
|
455
|
-
*/
|
|
456
|
-
value: PropTypes.oneOfType([PropTypes.any, PropTypes.instanceOf(Date), PropTypes.number, PropTypes.string]),
|
|
457
|
-
|
|
458
|
-
/**
|
|
459
|
-
* Array of views to show.
|
|
460
|
-
*/
|
|
461
|
-
views: PropTypes.arrayOf(PropTypes.oneOf(['day', 'month', 'year']).isRequired)
|
|
462
|
-
} : void 0;
|
|
463
19
|
export default DatePicker;
|
package/DatePicker/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default } from './DatePicker';
|
|
2
|
-
export
|
|
2
|
+
export * from './DatePicker';
|
package/DatePicker/index.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export { default } from './DatePicker';
|
|
1
|
+
export { default } from './DatePicker';
|
|
2
|
+
export * from './DatePicker';
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { DateTimePickerProps } from '@mui/x-date-pickers/DateTimePicker';
|
|
3
2
|
declare type DateTimePickerComponent = (<TDate>(props: DateTimePickerProps<TDate> & React.RefAttributes<HTMLDivElement>) => JSX.Element) & {
|
|
4
3
|
propTypes?: any;
|
|
5
4
|
};
|
|
@@ -8,3 +7,4 @@ declare type DateTimePickerComponent = (<TDate>(props: DateTimePickerProps<TDate
|
|
|
8
7
|
*/
|
|
9
8
|
declare const DateTimePicker: DateTimePickerComponent;
|
|
10
9
|
export default DateTimePicker;
|
|
10
|
+
export declare type DateTimePickerProps<TDate> = Record<any, any>;
|