@elliemae/ds-controlled-form 2.0.0-next.4 → 2.0.0-next.5
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.
|
@@ -95,7 +95,8 @@ const useControlledDateTimePicker = props => {
|
|
|
95
95
|
const isWithCalendarToo = type === ControlledDateTimePickerTypes.CONTROLLED_DATE_TIME_PICKER_TYPES.DATE_TIME.FULL || type === ControlledDateTimePickerTypes.CONTROLLED_DATE_TIME_PICKER_TYPES.DATE_TIME.PICKER || type === ControlledDateTimePickerTypes.CONTROLLED_DATE_TIME_PICKER_TYPES.DATE_TIME.CONTROLLER_ONLY;
|
|
96
96
|
const withAnyInputs = !hideDate || !hideTime;
|
|
97
97
|
const withAnyPicker = !hideDateTimePicker || !hideTimePicker || !hideDatePicker;
|
|
98
|
-
const withClearBtn = isClearable && withAnyInputs && (dateStringFromProps !== '__/__/____' && dateStringFromProps !== '' ||
|
|
98
|
+
const withClearBtn = isClearable && withAnyInputs && (dateStringFromProps !== '__/__/____' && dateStringFromProps !== '' || // date is not "empty-ish"
|
|
99
|
+
timeStringFromProps !== '__:__ __' && timeStringFromProps !== ''); // or time is not "empty-ish"
|
|
99
100
|
|
|
100
101
|
const isWithDateInputs = withAnyInputs && (isDateTimeSelector || isDateSelector);
|
|
101
102
|
const isWithDateInputsOnly = withAnyInputs && isDateSelector;
|
|
@@ -86,7 +86,8 @@ const useControlledDateTimePicker = props => {
|
|
|
86
86
|
const isWithCalendarToo = type === CONTROLLED_DATE_TIME_PICKER_TYPES.DATE_TIME.FULL || type === CONTROLLED_DATE_TIME_PICKER_TYPES.DATE_TIME.PICKER || type === CONTROLLED_DATE_TIME_PICKER_TYPES.DATE_TIME.CONTROLLER_ONLY;
|
|
87
87
|
const withAnyInputs = !hideDate || !hideTime;
|
|
88
88
|
const withAnyPicker = !hideDateTimePicker || !hideTimePicker || !hideDatePicker;
|
|
89
|
-
const withClearBtn = isClearable && withAnyInputs && (dateStringFromProps !== '__/__/____' && dateStringFromProps !== '' ||
|
|
89
|
+
const withClearBtn = isClearable && withAnyInputs && (dateStringFromProps !== '__/__/____' && dateStringFromProps !== '' || // date is not "empty-ish"
|
|
90
|
+
timeStringFromProps !== '__:__ __' && timeStringFromProps !== ''); // or time is not "empty-ish"
|
|
90
91
|
|
|
91
92
|
const isWithDateInputs = withAnyInputs && (isDateTimeSelector || isDateSelector);
|
|
92
93
|
const isWithDateInputsOnly = withAnyInputs && isDateSelector;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-controlled-form",
|
|
3
|
-
"version": "2.0.0-next.
|
|
3
|
+
"version": "2.0.0-next.5",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Controlled Form Controllers",
|
|
6
6
|
"module": "./esm/index.js",
|
|
@@ -456,9 +456,9 @@
|
|
|
456
456
|
"build": "node ../../scripts/build/build.js"
|
|
457
457
|
},
|
|
458
458
|
"dependencies": {
|
|
459
|
-
"@elliemae/ds-basic": "2.0.0-next.
|
|
460
|
-
"@elliemae/ds-button": "2.0.0-next.
|
|
461
|
-
"@elliemae/ds-icons": "2.0.0-next.
|
|
459
|
+
"@elliemae/ds-basic": "2.0.0-next.5",
|
|
460
|
+
"@elliemae/ds-button": "2.0.0-next.5",
|
|
461
|
+
"@elliemae/ds-icons": "2.0.0-next.5",
|
|
462
462
|
"prop-types": "~15.7.2",
|
|
463
463
|
"react-desc": "^4.1.3",
|
|
464
464
|
"react-popper": "~2.2.5"
|