@instructure/ui-date-time-input 8.53.3-snapshot-23 → 8.53.3-snapshot-26
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 +5 -2
- package/es/DateTimeInput/index.js +24 -21
- package/es/DateTimeInput/props.js +2 -1
- package/lib/DateTimeInput/index.js +24 -21
- package/lib/DateTimeInput/props.js +2 -1
- package/package.json +19 -19
- package/src/DateTimeInput/README.md +66 -0
- package/src/DateTimeInput/index.tsx +3 -0
- package/src/DateTimeInput/props.ts +10 -1
- package/tsconfig.build.tsbuildinfo +1 -1
- package/types/DateTimeInput/index.d.ts +1 -0
- package/types/DateTimeInput/index.d.ts.map +1 -1
- package/types/DateTimeInput/props.d.ts +7 -0
- package/types/DateTimeInput/props.d.ts.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,9 +3,12 @@
|
|
|
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
|
-
## [8.53.3-snapshot-
|
|
6
|
+
## [8.53.3-snapshot-26](https://github.com/instructure/instructure-ui/compare/v8.53.2...v8.53.3-snapshot-26) (2024-03-21)
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **ui-date-time-input:** make resetting programatically possible ([a474dab](https://github.com/instructure/instructure-ui/commit/a474daba920a16b6704f89e3c825902902ed1c0b))
|
|
9
12
|
|
|
10
13
|
|
|
11
14
|
|
|
@@ -51,6 +51,7 @@ let DateTimeInput = (_dec = testable(), _dec(_class = (_class2 = class DateTimeI
|
|
|
51
51
|
this.handleRef = el => {
|
|
52
52
|
this.ref = el;
|
|
53
53
|
};
|
|
54
|
+
this.reset = () => this.setState(this.recalculateState());
|
|
54
55
|
// Called when the user enters text into dateInput
|
|
55
56
|
this.handleDateTextChange = (_event, date) => {
|
|
56
57
|
const dateParsed = this.tryParseDate(date.value);
|
|
@@ -189,10 +190,12 @@ let DateTimeInput = (_dec = testable(), _dec(_class = (_class2 = class DateTimeI
|
|
|
189
190
|
this.state = this.recalculateState(props.value || props.defaultValue);
|
|
190
191
|
}
|
|
191
192
|
componentDidMount() {
|
|
193
|
+
var _this$props$reset, _this$props3;
|
|
192
194
|
// we'll need to recalculate the state because the context value is
|
|
193
195
|
// set at this point (and it might change locale & timezone)
|
|
194
196
|
const initState = this.recalculateState(this.props.value || this.props.defaultValue);
|
|
195
197
|
this.setState(initState);
|
|
198
|
+
(_this$props$reset = (_this$props3 = this.props).reset) === null || _this$props$reset === void 0 ? void 0 : _this$props$reset.call(_this$props3, this.reset);
|
|
196
199
|
}
|
|
197
200
|
componentDidUpdate(prevProps) {
|
|
198
201
|
const valueChanged = prevProps.value !== this.props.value || prevProps.defaultValue !== this.props.defaultValue;
|
|
@@ -411,27 +414,27 @@ let DateTimeInput = (_dec = testable(), _dec(_class = (_class2 = class DateTimeI
|
|
|
411
414
|
});
|
|
412
415
|
}
|
|
413
416
|
render() {
|
|
414
|
-
const _this$
|
|
415
|
-
description = _this$
|
|
416
|
-
datePlaceholder = _this$
|
|
417
|
-
timePlaceholder = _this$
|
|
418
|
-
dateRenderLabel = _this$
|
|
419
|
-
dateInputRef = _this$
|
|
420
|
-
timeRenderLabel = _this$
|
|
421
|
-
timeFormat = _this$
|
|
422
|
-
timeStep = _this$
|
|
423
|
-
timeInputRef = _this$
|
|
424
|
-
locale = _this$
|
|
425
|
-
timezone = _this$
|
|
426
|
-
showMessages = _this$
|
|
427
|
-
messages = _this$
|
|
428
|
-
layout = _this$
|
|
429
|
-
rowSpacing = _this$
|
|
430
|
-
colSpacing = _this$
|
|
431
|
-
isRequired = _this$
|
|
432
|
-
interaction = _this$
|
|
433
|
-
renderWeekdayLabels = _this$
|
|
434
|
-
allowNonStepInput = _this$
|
|
417
|
+
const _this$props4 = this.props,
|
|
418
|
+
description = _this$props4.description,
|
|
419
|
+
datePlaceholder = _this$props4.datePlaceholder,
|
|
420
|
+
timePlaceholder = _this$props4.timePlaceholder,
|
|
421
|
+
dateRenderLabel = _this$props4.dateRenderLabel,
|
|
422
|
+
dateInputRef = _this$props4.dateInputRef,
|
|
423
|
+
timeRenderLabel = _this$props4.timeRenderLabel,
|
|
424
|
+
timeFormat = _this$props4.timeFormat,
|
|
425
|
+
timeStep = _this$props4.timeStep,
|
|
426
|
+
timeInputRef = _this$props4.timeInputRef,
|
|
427
|
+
locale = _this$props4.locale,
|
|
428
|
+
timezone = _this$props4.timezone,
|
|
429
|
+
showMessages = _this$props4.showMessages,
|
|
430
|
+
messages = _this$props4.messages,
|
|
431
|
+
layout = _this$props4.layout,
|
|
432
|
+
rowSpacing = _this$props4.rowSpacing,
|
|
433
|
+
colSpacing = _this$props4.colSpacing,
|
|
434
|
+
isRequired = _this$props4.isRequired,
|
|
435
|
+
interaction = _this$props4.interaction,
|
|
436
|
+
renderWeekdayLabels = _this$props4.renderWeekdayLabels,
|
|
437
|
+
allowNonStepInput = _this$props4.allowNonStepInput;
|
|
435
438
|
return /*#__PURE__*/React.createElement(FormFieldGroup, {
|
|
436
439
|
description: description,
|
|
437
440
|
layout: layout,
|
|
@@ -67,7 +67,8 @@ const propTypes = {
|
|
|
67
67
|
disabledDates: PropTypes.oneOfType([PropTypes.func, PropTypes.arrayOf(PropTypes.string)]),
|
|
68
68
|
disabledDateTimeMessage: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
|
|
69
69
|
allowNonStepInput: PropTypes.bool,
|
|
70
|
+
reset: PropTypes.func,
|
|
70
71
|
initialTimeForNewDate: hourMinuteValidator
|
|
71
72
|
};
|
|
72
|
-
const allowedProps = ['description', 'dateRenderLabel', 'prevMonthLabel', 'nextMonthLabel', 'datePlaceholder', 'timePlaceholder', 'dateFormat', 'interaction', 'timeRenderLabel', 'timeStep', 'timeFormat', 'locale', 'timezone', 'invalidDateTimeMessage', 'showMessages', 'messages', 'messageFormat', 'layout', 'rowSpacing', 'colSpacing', 'value', 'defaultValue', 'renderWeekdayLabels', 'isRequired', 'onChange', 'dateInputRef', 'timeInputRef', 'onBlur', 'disabledDates', 'disabledDateTimeMessage', 'allowNonStepInput'];
|
|
73
|
+
const allowedProps = ['description', 'dateRenderLabel', 'prevMonthLabel', 'nextMonthLabel', 'datePlaceholder', 'timePlaceholder', 'dateFormat', 'interaction', 'timeRenderLabel', 'timeStep', 'timeFormat', 'locale', 'timezone', 'invalidDateTimeMessage', 'showMessages', 'messages', 'messageFormat', 'layout', 'rowSpacing', 'colSpacing', 'value', 'defaultValue', 'renderWeekdayLabels', 'isRequired', 'onChange', 'dateInputRef', 'timeInputRef', 'onBlur', 'disabledDates', 'disabledDateTimeMessage', 'allowNonStepInput', 'reset'];
|
|
73
74
|
export { propTypes, allowedProps };
|
|
@@ -59,6 +59,7 @@ let DateTimeInput = exports.DateTimeInput = (_dec = (0, _testable.testable)(), _
|
|
|
59
59
|
this.handleRef = el => {
|
|
60
60
|
this.ref = el;
|
|
61
61
|
};
|
|
62
|
+
this.reset = () => this.setState(this.recalculateState());
|
|
62
63
|
// Called when the user enters text into dateInput
|
|
63
64
|
this.handleDateTextChange = (_event, date) => {
|
|
64
65
|
const dateParsed = this.tryParseDate(date.value);
|
|
@@ -197,10 +198,12 @@ let DateTimeInput = exports.DateTimeInput = (_dec = (0, _testable.testable)(), _
|
|
|
197
198
|
this.state = this.recalculateState(props.value || props.defaultValue);
|
|
198
199
|
}
|
|
199
200
|
componentDidMount() {
|
|
201
|
+
var _this$props$reset, _this$props3;
|
|
200
202
|
// we'll need to recalculate the state because the context value is
|
|
201
203
|
// set at this point (and it might change locale & timezone)
|
|
202
204
|
const initState = this.recalculateState(this.props.value || this.props.defaultValue);
|
|
203
205
|
this.setState(initState);
|
|
206
|
+
(_this$props$reset = (_this$props3 = this.props).reset) === null || _this$props$reset === void 0 ? void 0 : _this$props$reset.call(_this$props3, this.reset);
|
|
204
207
|
}
|
|
205
208
|
componentDidUpdate(prevProps) {
|
|
206
209
|
const valueChanged = prevProps.value !== this.props.value || prevProps.defaultValue !== this.props.defaultValue;
|
|
@@ -419,27 +422,27 @@ let DateTimeInput = exports.DateTimeInput = (_dec = (0, _testable.testable)(), _
|
|
|
419
422
|
});
|
|
420
423
|
}
|
|
421
424
|
render() {
|
|
422
|
-
const _this$
|
|
423
|
-
description = _this$
|
|
424
|
-
datePlaceholder = _this$
|
|
425
|
-
timePlaceholder = _this$
|
|
426
|
-
dateRenderLabel = _this$
|
|
427
|
-
dateInputRef = _this$
|
|
428
|
-
timeRenderLabel = _this$
|
|
429
|
-
timeFormat = _this$
|
|
430
|
-
timeStep = _this$
|
|
431
|
-
timeInputRef = _this$
|
|
432
|
-
locale = _this$
|
|
433
|
-
timezone = _this$
|
|
434
|
-
showMessages = _this$
|
|
435
|
-
messages = _this$
|
|
436
|
-
layout = _this$
|
|
437
|
-
rowSpacing = _this$
|
|
438
|
-
colSpacing = _this$
|
|
439
|
-
isRequired = _this$
|
|
440
|
-
interaction = _this$
|
|
441
|
-
renderWeekdayLabels = _this$
|
|
442
|
-
allowNonStepInput = _this$
|
|
425
|
+
const _this$props4 = this.props,
|
|
426
|
+
description = _this$props4.description,
|
|
427
|
+
datePlaceholder = _this$props4.datePlaceholder,
|
|
428
|
+
timePlaceholder = _this$props4.timePlaceholder,
|
|
429
|
+
dateRenderLabel = _this$props4.dateRenderLabel,
|
|
430
|
+
dateInputRef = _this$props4.dateInputRef,
|
|
431
|
+
timeRenderLabel = _this$props4.timeRenderLabel,
|
|
432
|
+
timeFormat = _this$props4.timeFormat,
|
|
433
|
+
timeStep = _this$props4.timeStep,
|
|
434
|
+
timeInputRef = _this$props4.timeInputRef,
|
|
435
|
+
locale = _this$props4.locale,
|
|
436
|
+
timezone = _this$props4.timezone,
|
|
437
|
+
showMessages = _this$props4.showMessages,
|
|
438
|
+
messages = _this$props4.messages,
|
|
439
|
+
layout = _this$props4.layout,
|
|
440
|
+
rowSpacing = _this$props4.rowSpacing,
|
|
441
|
+
colSpacing = _this$props4.colSpacing,
|
|
442
|
+
isRequired = _this$props4.isRequired,
|
|
443
|
+
interaction = _this$props4.interaction,
|
|
444
|
+
renderWeekdayLabels = _this$props4.renderWeekdayLabels,
|
|
445
|
+
allowNonStepInput = _this$props4.allowNonStepInput;
|
|
443
446
|
return /*#__PURE__*/_react.default.createElement(_FormFieldGroup.FormFieldGroup, {
|
|
444
447
|
description: description,
|
|
445
448
|
layout: layout,
|
|
@@ -74,6 +74,7 @@ const propTypes = exports.propTypes = {
|
|
|
74
74
|
disabledDates: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.arrayOf(_propTypes.default.string)]),
|
|
75
75
|
disabledDateTimeMessage: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.func]),
|
|
76
76
|
allowNonStepInput: _propTypes.default.bool,
|
|
77
|
+
reset: _propTypes.default.func,
|
|
77
78
|
initialTimeForNewDate: hourMinuteValidator
|
|
78
79
|
};
|
|
79
|
-
const allowedProps = exports.allowedProps = ['description', 'dateRenderLabel', 'prevMonthLabel', 'nextMonthLabel', 'datePlaceholder', 'timePlaceholder', 'dateFormat', 'interaction', 'timeRenderLabel', 'timeStep', 'timeFormat', 'locale', 'timezone', 'invalidDateTimeMessage', 'showMessages', 'messages', 'messageFormat', 'layout', 'rowSpacing', 'colSpacing', 'value', 'defaultValue', 'renderWeekdayLabels', 'isRequired', 'onChange', 'dateInputRef', 'timeInputRef', 'onBlur', 'disabledDates', 'disabledDateTimeMessage', 'allowNonStepInput'];
|
|
80
|
+
const allowedProps = exports.allowedProps = ['description', 'dateRenderLabel', 'prevMonthLabel', 'nextMonthLabel', 'datePlaceholder', 'timePlaceholder', 'dateFormat', 'interaction', 'timeRenderLabel', 'timeStep', 'timeFormat', 'locale', 'timezone', 'invalidDateTimeMessage', 'showMessages', 'messages', 'messageFormat', 'layout', 'rowSpacing', 'colSpacing', 'value', 'defaultValue', 'renderWeekdayLabels', 'isRequired', 'onChange', 'dateInputRef', 'timeInputRef', 'onBlur', 'disabledDates', 'disabledDateTimeMessage', 'allowNonStepInput', 'reset'];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-date-time-input",
|
|
3
|
-
"version": "8.53.3-snapshot-
|
|
3
|
+
"version": "8.53.3-snapshot-26",
|
|
4
4
|
"description": "A UI component that allows to select date and time.",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"module": "./es/index.js",
|
|
@@ -23,30 +23,30 @@
|
|
|
23
23
|
},
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@instructure/ui-babel-preset": "8.53.3-snapshot-
|
|
27
|
-
"@instructure/ui-test-locator": "8.53.3-snapshot-
|
|
28
|
-
"@instructure/ui-test-utils": "8.53.3-snapshot-
|
|
26
|
+
"@instructure/ui-babel-preset": "8.53.3-snapshot-26",
|
|
27
|
+
"@instructure/ui-test-locator": "8.53.3-snapshot-26",
|
|
28
|
+
"@instructure/ui-test-utils": "8.53.3-snapshot-26",
|
|
29
29
|
"@testing-library/jest-dom": "^6.1.4",
|
|
30
30
|
"@testing-library/react": "^14.1.2",
|
|
31
31
|
"@testing-library/user-event": "^14.5.1"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@babel/runtime": "^7.23.2",
|
|
35
|
-
"@instructure/console": "8.53.3-snapshot-
|
|
36
|
-
"@instructure/debounce": "8.53.3-snapshot-
|
|
37
|
-
"@instructure/emotion": "8.53.3-snapshot-
|
|
38
|
-
"@instructure/ui-a11y-content": "8.53.3-snapshot-
|
|
39
|
-
"@instructure/ui-buttons": "8.53.3-snapshot-
|
|
40
|
-
"@instructure/ui-calendar": "8.53.3-snapshot-
|
|
41
|
-
"@instructure/ui-date-input": "8.53.3-snapshot-
|
|
42
|
-
"@instructure/ui-form-field": "8.53.3-snapshot-
|
|
43
|
-
"@instructure/ui-i18n": "8.53.3-snapshot-
|
|
44
|
-
"@instructure/ui-icons": "8.53.3-snapshot-
|
|
45
|
-
"@instructure/ui-prop-types": "8.53.3-snapshot-
|
|
46
|
-
"@instructure/ui-react-utils": "8.53.3-snapshot-
|
|
47
|
-
"@instructure/ui-testable": "8.53.3-snapshot-
|
|
48
|
-
"@instructure/ui-time-select": "8.53.3-snapshot-
|
|
49
|
-
"@instructure/ui-utils": "8.53.3-snapshot-
|
|
35
|
+
"@instructure/console": "8.53.3-snapshot-26",
|
|
36
|
+
"@instructure/debounce": "8.53.3-snapshot-26",
|
|
37
|
+
"@instructure/emotion": "8.53.3-snapshot-26",
|
|
38
|
+
"@instructure/ui-a11y-content": "8.53.3-snapshot-26",
|
|
39
|
+
"@instructure/ui-buttons": "8.53.3-snapshot-26",
|
|
40
|
+
"@instructure/ui-calendar": "8.53.3-snapshot-26",
|
|
41
|
+
"@instructure/ui-date-input": "8.53.3-snapshot-26",
|
|
42
|
+
"@instructure/ui-form-field": "8.53.3-snapshot-26",
|
|
43
|
+
"@instructure/ui-i18n": "8.53.3-snapshot-26",
|
|
44
|
+
"@instructure/ui-icons": "8.53.3-snapshot-26",
|
|
45
|
+
"@instructure/ui-prop-types": "8.53.3-snapshot-26",
|
|
46
|
+
"@instructure/ui-react-utils": "8.53.3-snapshot-26",
|
|
47
|
+
"@instructure/ui-testable": "8.53.3-snapshot-26",
|
|
48
|
+
"@instructure/ui-time-select": "8.53.3-snapshot-26",
|
|
49
|
+
"@instructure/ui-utils": "8.53.3-snapshot-26",
|
|
50
50
|
"prop-types": "^15.8.1"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
@@ -219,3 +219,69 @@ class Example extends React.Component {
|
|
|
219
219
|
|
|
220
220
|
render(<Example />)
|
|
221
221
|
```
|
|
222
|
+
|
|
223
|
+
#### Programatically reset `DateTimeInput`
|
|
224
|
+
|
|
225
|
+
Due to `onChange` not being called on every typing event, and `value` isn't representing the inner value-state of the component, it's not possible to reset the `DateTimeInput` by setting the `value` to `undefined`. Instead, you can use the `reset` function that is passed to the `DateTimeInput` as a prop.
|
|
226
|
+
|
|
227
|
+
- ```js
|
|
228
|
+
class Example extends React.Component {
|
|
229
|
+
constructor(props) {
|
|
230
|
+
super(props)
|
|
231
|
+
this.state = {
|
|
232
|
+
date: ''
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
resetFn = null
|
|
237
|
+
|
|
238
|
+
render() {
|
|
239
|
+
return (
|
|
240
|
+
<div>
|
|
241
|
+
<DateTimeInput
|
|
242
|
+
description="Pick a date and time"
|
|
243
|
+
datePlaceholder="Choose a date"
|
|
244
|
+
dateRenderLabel="Date"
|
|
245
|
+
timeRenderLabel="Time"
|
|
246
|
+
invalidDateTimeMessage="Invalid date!"
|
|
247
|
+
prevMonthLabel="Previous month"
|
|
248
|
+
nextMonthLabel="Next month"
|
|
249
|
+
value={this.state.date}
|
|
250
|
+
onChange={(e, newDate) => this.setState({ date: newDate })}
|
|
251
|
+
reset={(reset) => (this.resetFn = reset)}
|
|
252
|
+
/>
|
|
253
|
+
<Button onClick={() => this.resetFn()}>Clear</Button>
|
|
254
|
+
<p>{this.state.date}</p>
|
|
255
|
+
</div>
|
|
256
|
+
)
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
render(<Example />)
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
- ```js
|
|
263
|
+
const Example = () => {
|
|
264
|
+
const [date, setDate] = useState('')
|
|
265
|
+
const resetFn = useRef()
|
|
266
|
+
|
|
267
|
+
return (
|
|
268
|
+
<div>
|
|
269
|
+
<DateTimeInput
|
|
270
|
+
description="Pick a date and time"
|
|
271
|
+
datePlaceholder="Choose a date"
|
|
272
|
+
dateRenderLabel="Date"
|
|
273
|
+
timeRenderLabel="Time"
|
|
274
|
+
invalidDateTimeMessage="Invalid date!"
|
|
275
|
+
prevMonthLabel="Previous month"
|
|
276
|
+
nextMonthLabel="Next month"
|
|
277
|
+
value={date}
|
|
278
|
+
onChange={(e, newDate) => setDate(newDate)}
|
|
279
|
+
reset={(reset) => (resetFn.current = reset)}
|
|
280
|
+
/>
|
|
281
|
+
<Button onClick={() => resetFn.current()}>Clear</Button>
|
|
282
|
+
<p>{date}</p>
|
|
283
|
+
</div>
|
|
284
|
+
)
|
|
285
|
+
}
|
|
286
|
+
render(<Example />)
|
|
287
|
+
```
|
|
@@ -88,6 +88,7 @@ class DateTimeInput extends Component<DateTimeInputProps, DateTimeInputState> {
|
|
|
88
88
|
this.props.value || this.props.defaultValue
|
|
89
89
|
)
|
|
90
90
|
this.setState(initState)
|
|
91
|
+
this.props.reset?.(this.reset)
|
|
91
92
|
}
|
|
92
93
|
|
|
93
94
|
componentDidUpdate(prevProps: Readonly<DateTimeInputProps>): void {
|
|
@@ -206,6 +207,8 @@ class DateTimeInput extends Component<DateTimeInputProps, DateTimeInputState> {
|
|
|
206
207
|
}
|
|
207
208
|
}
|
|
208
209
|
|
|
210
|
+
reset = () => this.setState(this.recalculateState())
|
|
211
|
+
|
|
209
212
|
locale(): string {
|
|
210
213
|
if (this.props.locale) {
|
|
211
214
|
return this.props.locale
|
|
@@ -247,6 +247,13 @@ type DateTimeInputProps = {
|
|
|
247
247
|
* An error is thrown if the time format is not HH:MM.
|
|
248
248
|
*/
|
|
249
249
|
initialTimeForNewDate?: string
|
|
250
|
+
/**
|
|
251
|
+
* Used for getting the internal reset function of DateTimeInput. If that
|
|
252
|
+
* function is called, the component will reset to its default inner state.
|
|
253
|
+
* The callback function will be called in componentDidMount
|
|
254
|
+
* NOTE: this won't call onChange, so you have to reset the value manually when calling reset
|
|
255
|
+
*/
|
|
256
|
+
reset?: (reset: () => void) => void
|
|
250
257
|
}
|
|
251
258
|
|
|
252
259
|
type DateTimeInputState = {
|
|
@@ -339,6 +346,7 @@ const propTypes: PropValidators<PropKeys> = {
|
|
|
339
346
|
PropTypes.func
|
|
340
347
|
]),
|
|
341
348
|
allowNonStepInput: PropTypes.bool,
|
|
349
|
+
reset: PropTypes.func,
|
|
342
350
|
initialTimeForNewDate: hourMinuteValidator
|
|
343
351
|
}
|
|
344
352
|
|
|
@@ -373,7 +381,8 @@ const allowedProps: AllowedPropKeys = [
|
|
|
373
381
|
'onBlur',
|
|
374
382
|
'disabledDates',
|
|
375
383
|
'disabledDateTimeMessage',
|
|
376
|
-
'allowNonStepInput'
|
|
384
|
+
'allowNonStepInput',
|
|
385
|
+
'reset'
|
|
377
386
|
]
|
|
378
387
|
|
|
379
388
|
export type { DateTimeInputProps, DateTimeInputState }
|