@elliemae/ds-date-time-picker 2.0.0-next.8 → 2.0.0-rc.3
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/cjs/DSDateTimePicker.js
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
require('core-js/modules/esnext.async-iterator.filter.js');
|
|
6
|
+
require('core-js/modules/esnext.iterator.constructor.js');
|
|
7
|
+
require('core-js/modules/esnext.iterator.filter.js');
|
|
8
|
+
require('core-js/modules/esnext.async-iterator.for-each.js');
|
|
9
|
+
require('core-js/modules/esnext.iterator.for-each.js');
|
|
5
10
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
6
11
|
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
7
12
|
require('react');
|
|
@@ -28,45 +33,46 @@ const {
|
|
|
28
33
|
id: idDefault
|
|
29
34
|
} = english;
|
|
30
35
|
|
|
31
|
-
const DSDateTimePicker =
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}
|
|
36
|
+
const DSDateTimePicker = _ref => {
|
|
37
|
+
let {
|
|
38
|
+
containerProps = {},
|
|
39
|
+
className = classNameDefault,
|
|
40
|
+
id = idDefault,
|
|
41
|
+
placeholder = placeholderDefault,
|
|
42
|
+
date,
|
|
43
|
+
clearable = false,
|
|
44
|
+
onBlur = () => null,
|
|
45
|
+
datePickerProps = {
|
|
46
|
+
disabled: false,
|
|
47
|
+
numberOfMonths: 1,
|
|
48
|
+
readOnly: false,
|
|
49
|
+
enableOutsideDays: false,
|
|
50
|
+
transitionDuration: 0,
|
|
51
|
+
firstDayOfWeek: 0,
|
|
52
|
+
keepOpenOnDateSelect: true,
|
|
53
|
+
hideKeyboardShortcutsPanel: true,
|
|
54
|
+
onPrevMonthClick: () => null,
|
|
55
|
+
onNextMonthClick: () => null,
|
|
56
|
+
onClose: () => null,
|
|
57
|
+
onchange: () => null,
|
|
58
|
+
onDateChange: () => null,
|
|
59
|
+
phrases: dsDatePicker.SingleDatePickerPhrases,
|
|
60
|
+
displayFormatDay: 'D',
|
|
61
|
+
isDayBlocked: () => false,
|
|
62
|
+
isOutsideRange: () => false,
|
|
63
|
+
isDayHighlighted: () => false,
|
|
64
|
+
zIndex: 11
|
|
65
|
+
},
|
|
66
|
+
timePickerProps = {
|
|
67
|
+
format: 'hh:mm A',
|
|
68
|
+
onChange: () => null,
|
|
69
|
+
disabledTimes: undefined,
|
|
70
|
+
minutesInterval: 1
|
|
71
|
+
},
|
|
72
|
+
dateInputProps = {
|
|
73
|
+
onDateInputDateChange: () => null
|
|
74
|
+
}
|
|
75
|
+
} = _ref;
|
|
70
76
|
const {
|
|
71
77
|
cssClassName
|
|
72
78
|
} = dsClassnames.convertPropToCssClassName('datetimepicker', className, {
|
|
@@ -4,16 +4,18 @@ var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProp
|
|
|
4
4
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
5
5
|
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
6
6
|
require('core-js/modules/web.dom-collections.iterator.js');
|
|
7
|
+
require('core-js/modules/esnext.async-iterator.filter.js');
|
|
8
|
+
require('core-js/modules/esnext.iterator.constructor.js');
|
|
9
|
+
require('core-js/modules/esnext.iterator.filter.js');
|
|
10
|
+
require('core-js/modules/esnext.async-iterator.for-each.js');
|
|
11
|
+
require('core-js/modules/esnext.iterator.for-each.js');
|
|
7
12
|
var react = require('react');
|
|
8
13
|
var moment = require('moment');
|
|
9
14
|
var dsClassnames = require('@elliemae/ds-classnames');
|
|
10
15
|
var dsDatePicker = require('@elliemae/ds-date-picker');
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
var
|
|
14
|
-
var TimeInput = require('@elliemae/ds-basic/form/TimeInput');
|
|
15
|
-
var timeUtils = require('@elliemae/ds-utilities/timeUtils');
|
|
16
|
-
var TimePicker$1 = require('@elliemae/ds-basic/TimePicker');
|
|
16
|
+
var dsForm = require('@elliemae/ds-form');
|
|
17
|
+
var dsUtilities = require('@elliemae/ds-utilities');
|
|
18
|
+
var dsTimePicker = require('@elliemae/ds-time-picker');
|
|
17
19
|
var utils = require('../utils.js');
|
|
18
20
|
var jsxRuntime = require('react/jsx-runtime');
|
|
19
21
|
|
|
@@ -23,8 +25,6 @@ var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultLegacy(_obje
|
|
|
23
25
|
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
24
26
|
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
25
27
|
var moment__default = /*#__PURE__*/_interopDefaultLegacy(moment);
|
|
26
|
-
var DSInputGroup__default = /*#__PURE__*/_interopDefaultLegacy(DSInputGroup);
|
|
27
|
-
var DSInput__default = /*#__PURE__*/_interopDefaultLegacy(DSInput);
|
|
28
28
|
|
|
29
29
|
const _excluded = ["onChange"];
|
|
30
30
|
|
|
@@ -33,55 +33,56 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
33
33
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
34
34
|
const blockName = 'date-time-picker';
|
|
35
35
|
const DateTimePickerWrapper = dsClassnames.aggregatedClasses('div')(blockName, 'wrapper');
|
|
36
|
-
const TimePicker = dsClassnames.aggregatedClasses(
|
|
36
|
+
const TimePicker = dsClassnames.aggregatedClasses(dsTimePicker.DSTimePickerMenu)(blockName, 'time-picker');
|
|
37
37
|
const TimePickerWrapper = dsClassnames.aggregatedClasses('div')(blockName, 'time-picker-wrapper'); // const DateInput = aggregatedClasses(DateInputsV2Impl)(blockName, 'date-input');
|
|
38
38
|
|
|
39
39
|
const formatDate = 'MMDDYYYY';
|
|
40
40
|
|
|
41
|
-
const DSDateTimePickerImpl =
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
}
|
|
41
|
+
const DSDateTimePickerImpl = _ref => {
|
|
42
|
+
let {
|
|
43
|
+
onBlur = () => null,
|
|
44
|
+
placeholder,
|
|
45
|
+
date,
|
|
46
|
+
clearable,
|
|
47
|
+
datePickerProps: {
|
|
48
|
+
disabled = false,
|
|
49
|
+
numberOfMonths = 1,
|
|
50
|
+
readOnly = false,
|
|
51
|
+
enableOutsideDays = false,
|
|
52
|
+
transitionDuration = 0,
|
|
53
|
+
firstDayOfWeek = 0,
|
|
54
|
+
keepOpenOnDateSelect = true,
|
|
55
|
+
hideKeyboardShortcutsPanel = true,
|
|
56
|
+
onPrevMonthClick = () => null,
|
|
57
|
+
onNextMonthClick = () => null,
|
|
58
|
+
onClose = () => null,
|
|
59
|
+
onChange: onDatePickerChange = () => null,
|
|
60
|
+
onDateChange = () => null,
|
|
61
|
+
onError: onErrorDate = () => null,
|
|
62
|
+
phrases = dsDatePicker.SingleDatePickerPhrases,
|
|
63
|
+
displayFormatDay = 'D',
|
|
64
|
+
isDayBlocked = () => false,
|
|
65
|
+
isOutsideRange = () => false,
|
|
66
|
+
isDayHighlighted = () => false,
|
|
67
|
+
zIndex = 11
|
|
68
|
+
},
|
|
69
|
+
timePickerProps: {
|
|
70
|
+
format = 'hh:mm A',
|
|
71
|
+
onChange: onChangeTimePicker = () => null,
|
|
72
|
+
disabledTimes = undefined,
|
|
73
|
+
onError: onErrorTime = () => null,
|
|
74
|
+
minutesInterval = 1
|
|
75
|
+
},
|
|
76
|
+
dateInputProps: {
|
|
77
|
+
onDateInputDateChange = () => null
|
|
78
|
+
}
|
|
79
|
+
} = _ref;
|
|
79
80
|
const [selectedDate, setSelectedDate] = react.useState(undefined);
|
|
80
81
|
const [incompleteInput, setIncompleteInput] = react.useState(undefined);
|
|
81
82
|
const [isOpen, setIsOpen] = react.useState(false);
|
|
82
83
|
const disabledTimeRange = disabledTimes && {
|
|
83
|
-
from:
|
|
84
|
-
to:
|
|
84
|
+
from: dsTimePicker.convertTimeString(disabledTimes.from),
|
|
85
|
+
to: dsTimePicker.convertTimeString(disabledTimes.to)
|
|
85
86
|
};
|
|
86
87
|
const dateTimePickerWrapperRef = react.useRef();
|
|
87
88
|
const fullFormat = "".concat(formatDate, " ").concat(format);
|
|
@@ -90,7 +91,7 @@ const DSDateTimePickerImpl = ({
|
|
|
90
91
|
setSelectedDate(moment__default["default"](date));
|
|
91
92
|
} else if (date === null) setSelectedDate(undefined);
|
|
92
93
|
}, [date]);
|
|
93
|
-
const visiblePanels = react.useMemo(() =>
|
|
94
|
+
const visiblePanels = react.useMemo(() => dsUtilities.getVisibleTimeByFormat(format), []);
|
|
94
95
|
const currentYear = moment__default["default"]().year();
|
|
95
96
|
|
|
96
97
|
const handleDatePickerChange = dateSelected => {
|
|
@@ -198,7 +199,7 @@ const DSDateTimePickerImpl = ({
|
|
|
198
199
|
});
|
|
199
200
|
}, [isOpen]);
|
|
200
201
|
const hasSelectedDate = !!selectedDate;
|
|
201
|
-
return /*#__PURE__*/_jsx__default["default"](
|
|
202
|
+
return /*#__PURE__*/_jsx__default["default"](dsForm.DSInputGroup, {
|
|
202
203
|
containerProps: {
|
|
203
204
|
onBlur: handleContainerBlur
|
|
204
205
|
},
|
|
@@ -246,19 +247,19 @@ const DSDateTimePickerImpl = ({
|
|
|
246
247
|
onClick: handleOpen,
|
|
247
248
|
readOnly: readOnly
|
|
248
249
|
})
|
|
249
|
-
}, void 0, /*#__PURE__*/_jsx__default["default"](
|
|
250
|
-
customInputType:
|
|
250
|
+
}, void 0, /*#__PURE__*/_jsx__default["default"](dsForm.DSInput, {
|
|
251
|
+
customInputType: _ref2 => {
|
|
251
252
|
let {
|
|
252
253
|
onChange: handleChange
|
|
253
|
-
} =
|
|
254
|
-
restInputProps = _objectWithoutProperties__default["default"](
|
|
254
|
+
} = _ref2,
|
|
255
|
+
restInputProps = _objectWithoutProperties__default["default"](_ref2, _excluded);
|
|
255
256
|
|
|
256
257
|
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
257
258
|
children: [/*#__PURE__*/_jsx__default["default"]("div", {
|
|
258
259
|
style: {
|
|
259
260
|
display: 'flex'
|
|
260
261
|
}
|
|
261
|
-
}, void 0, /*#__PURE__*/jsxRuntime.jsx(
|
|
262
|
+
}, void 0, /*#__PURE__*/jsxRuntime.jsx(dsForm.DateInputsV2Impl, _objectSpread(_objectSpread({
|
|
262
263
|
disabled: disabled,
|
|
263
264
|
onChange: input => handleChange(input, 'date')
|
|
264
265
|
}, restInputProps), {}, {
|
|
@@ -266,7 +267,7 @@ const DSDateTimePickerImpl = ({
|
|
|
266
267
|
yearMaxRange: currentYear + 100,
|
|
267
268
|
yearMinRange: currentYear - 100,
|
|
268
269
|
time: restInputProps.value && restInputProps.value.hour && restInputProps.value.isValid() ? restInputProps.value.format(formatDate) : restInputProps.value
|
|
269
|
-
}))), /*#__PURE__*/jsxRuntime.jsx(
|
|
270
|
+
}))), /*#__PURE__*/jsxRuntime.jsx(dsForm.TimeInputImpl, _objectSpread({
|
|
270
271
|
disabled: disabled,
|
|
271
272
|
format: format,
|
|
272
273
|
onChange: time => handleChange(time, 'time')
|
package/esm/DSDateTimePicker.js
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
2
|
+
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
3
|
+
import 'core-js/modules/esnext.iterator.filter.js';
|
|
4
|
+
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
5
|
+
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
1
6
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
2
7
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
3
8
|
import 'react';
|
|
@@ -18,45 +23,46 @@ const {
|
|
|
18
23
|
id: idDefault
|
|
19
24
|
} = english;
|
|
20
25
|
|
|
21
|
-
const DSDateTimePicker =
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}
|
|
26
|
+
const DSDateTimePicker = _ref => {
|
|
27
|
+
let {
|
|
28
|
+
containerProps = {},
|
|
29
|
+
className = classNameDefault,
|
|
30
|
+
id = idDefault,
|
|
31
|
+
placeholder = placeholderDefault,
|
|
32
|
+
date,
|
|
33
|
+
clearable = false,
|
|
34
|
+
onBlur = () => null,
|
|
35
|
+
datePickerProps = {
|
|
36
|
+
disabled: false,
|
|
37
|
+
numberOfMonths: 1,
|
|
38
|
+
readOnly: false,
|
|
39
|
+
enableOutsideDays: false,
|
|
40
|
+
transitionDuration: 0,
|
|
41
|
+
firstDayOfWeek: 0,
|
|
42
|
+
keepOpenOnDateSelect: true,
|
|
43
|
+
hideKeyboardShortcutsPanel: true,
|
|
44
|
+
onPrevMonthClick: () => null,
|
|
45
|
+
onNextMonthClick: () => null,
|
|
46
|
+
onClose: () => null,
|
|
47
|
+
onchange: () => null,
|
|
48
|
+
onDateChange: () => null,
|
|
49
|
+
phrases: SingleDatePickerPhrases,
|
|
50
|
+
displayFormatDay: 'D',
|
|
51
|
+
isDayBlocked: () => false,
|
|
52
|
+
isOutsideRange: () => false,
|
|
53
|
+
isDayHighlighted: () => false,
|
|
54
|
+
zIndex: 11
|
|
55
|
+
},
|
|
56
|
+
timePickerProps = {
|
|
57
|
+
format: 'hh:mm A',
|
|
58
|
+
onChange: () => null,
|
|
59
|
+
disabledTimes: undefined,
|
|
60
|
+
minutesInterval: 1
|
|
61
|
+
},
|
|
62
|
+
dateInputProps = {
|
|
63
|
+
onDateInputDateChange: () => null
|
|
64
|
+
}
|
|
65
|
+
} = _ref;
|
|
60
66
|
const {
|
|
61
67
|
cssClassName
|
|
62
68
|
} = convertPropToCssClassName('datetimepicker', className, {
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
2
|
+
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
3
|
+
import 'core-js/modules/esnext.iterator.filter.js';
|
|
4
|
+
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
5
|
+
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
1
6
|
import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
|
|
2
7
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
3
8
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
@@ -5,13 +10,10 @@ import 'core-js/modules/web.dom-collections.iterator.js';
|
|
|
5
10
|
import { useState, useRef, useEffect, useMemo } from 'react';
|
|
6
11
|
import moment from 'moment';
|
|
7
12
|
import { aggregatedClasses } from '@elliemae/ds-classnames';
|
|
8
|
-
import {
|
|
9
|
-
import DSInputGroup from '@elliemae/ds-
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import { TimeInputImpl } from '@elliemae/ds-basic/form/TimeInput';
|
|
13
|
-
import { getVisibleTimeByFormat } from '@elliemae/ds-utilities/timeUtils';
|
|
14
|
-
import { Menu, convertTimeString } from '@elliemae/ds-basic/TimePicker';
|
|
13
|
+
import { DatePickerDropdown, DSDatePickerController, SingleDatePickerPhrases } from '@elliemae/ds-date-picker';
|
|
14
|
+
import { DSInputGroup, DSInput, DateInputsV2Impl, TimeInputImpl } from '@elliemae/ds-form';
|
|
15
|
+
import { getVisibleTimeByFormat } from '@elliemae/ds-utilities';
|
|
16
|
+
import { DSTimePickerMenu, convertTimeString } from '@elliemae/ds-time-picker';
|
|
15
17
|
import { updateDateAndTime } from '../utils.js';
|
|
16
18
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
17
19
|
|
|
@@ -22,49 +24,50 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
22
24
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
23
25
|
const blockName = 'date-time-picker';
|
|
24
26
|
const DateTimePickerWrapper = aggregatedClasses('div')(blockName, 'wrapper');
|
|
25
|
-
const TimePicker = aggregatedClasses(
|
|
27
|
+
const TimePicker = aggregatedClasses(DSTimePickerMenu)(blockName, 'time-picker');
|
|
26
28
|
const TimePickerWrapper = aggregatedClasses('div')(blockName, 'time-picker-wrapper'); // const DateInput = aggregatedClasses(DateInputsV2Impl)(blockName, 'date-input');
|
|
27
29
|
|
|
28
30
|
const formatDate = 'MMDDYYYY';
|
|
29
31
|
|
|
30
|
-
const DSDateTimePickerImpl =
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
}
|
|
32
|
+
const DSDateTimePickerImpl = _ref => {
|
|
33
|
+
let {
|
|
34
|
+
onBlur = () => null,
|
|
35
|
+
placeholder,
|
|
36
|
+
date,
|
|
37
|
+
clearable,
|
|
38
|
+
datePickerProps: {
|
|
39
|
+
disabled = false,
|
|
40
|
+
numberOfMonths = 1,
|
|
41
|
+
readOnly = false,
|
|
42
|
+
enableOutsideDays = false,
|
|
43
|
+
transitionDuration = 0,
|
|
44
|
+
firstDayOfWeek = 0,
|
|
45
|
+
keepOpenOnDateSelect = true,
|
|
46
|
+
hideKeyboardShortcutsPanel = true,
|
|
47
|
+
onPrevMonthClick = () => null,
|
|
48
|
+
onNextMonthClick = () => null,
|
|
49
|
+
onClose = () => null,
|
|
50
|
+
onChange: onDatePickerChange = () => null,
|
|
51
|
+
onDateChange = () => null,
|
|
52
|
+
onError: onErrorDate = () => null,
|
|
53
|
+
phrases = SingleDatePickerPhrases,
|
|
54
|
+
displayFormatDay = 'D',
|
|
55
|
+
isDayBlocked = () => false,
|
|
56
|
+
isOutsideRange = () => false,
|
|
57
|
+
isDayHighlighted = () => false,
|
|
58
|
+
zIndex = 11
|
|
59
|
+
},
|
|
60
|
+
timePickerProps: {
|
|
61
|
+
format = 'hh:mm A',
|
|
62
|
+
onChange: onChangeTimePicker = () => null,
|
|
63
|
+
disabledTimes = undefined,
|
|
64
|
+
onError: onErrorTime = () => null,
|
|
65
|
+
minutesInterval = 1
|
|
66
|
+
},
|
|
67
|
+
dateInputProps: {
|
|
68
|
+
onDateInputDateChange = () => null
|
|
69
|
+
}
|
|
70
|
+
} = _ref;
|
|
68
71
|
const [selectedDate, setSelectedDate] = useState(undefined);
|
|
69
72
|
const [incompleteInput, setIncompleteInput] = useState(undefined);
|
|
70
73
|
const [isOpen, setIsOpen] = useState(false);
|
|
@@ -236,11 +239,11 @@ const DSDateTimePickerImpl = ({
|
|
|
236
239
|
readOnly: readOnly
|
|
237
240
|
})
|
|
238
241
|
}, void 0, /*#__PURE__*/_jsx(DSInput, {
|
|
239
|
-
customInputType:
|
|
242
|
+
customInputType: _ref2 => {
|
|
240
243
|
let {
|
|
241
244
|
onChange: handleChange
|
|
242
|
-
} =
|
|
243
|
-
restInputProps = _objectWithoutProperties(
|
|
245
|
+
} = _ref2,
|
|
246
|
+
restInputProps = _objectWithoutProperties(_ref2, _excluded);
|
|
244
247
|
|
|
245
248
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
246
249
|
children: [/*#__PURE__*/_jsx("div", {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-date-time-picker",
|
|
3
|
-
"version": "2.0.0-
|
|
3
|
+
"version": "2.0.0-rc.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Date Time Picker",
|
|
6
6
|
"module": "./esm/index.js",
|
|
@@ -52,11 +52,11 @@
|
|
|
52
52
|
"build": "node ../../scripts/build/build.js"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@elliemae/ds-basic": "2.0.0-
|
|
56
|
-
"@elliemae/ds-classnames": "2.0.0-
|
|
57
|
-
"@elliemae/ds-date-picker": "2.0.0-
|
|
58
|
-
"@elliemae/ds-form": "2.0.0-
|
|
59
|
-
"@elliemae/ds-utilities": "2.0.0-
|
|
55
|
+
"@elliemae/ds-basic": "2.0.0-rc.3",
|
|
56
|
+
"@elliemae/ds-classnames": "2.0.0-rc.3",
|
|
57
|
+
"@elliemae/ds-date-picker": "2.0.0-rc.3",
|
|
58
|
+
"@elliemae/ds-form": "2.0.0-rc.3",
|
|
59
|
+
"@elliemae/ds-utilities": "2.0.0-rc.3",
|
|
60
60
|
"lodash": "~4.17.21",
|
|
61
61
|
"moment": "~2.29.1",
|
|
62
62
|
"prop-types": "~15.7.2",
|