@portnet/ui 0.0.113 → 0.0.114
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.
|
@@ -113,8 +113,7 @@ const PuiStandardDateField = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
113
113
|
onBlur: onBlur,
|
|
114
114
|
helperText: helperText
|
|
115
115
|
}, params), {}, {
|
|
116
|
-
error:
|
|
117
|
-
helperText: meta.touched && meta.error ? meta.error : helperText,
|
|
116
|
+
error: params.error || error,
|
|
118
117
|
inputProps: _objectSpread({
|
|
119
118
|
name
|
|
120
119
|
}, params.inputProps)
|
|
@@ -149,13 +148,12 @@ const PuiFormikDateField = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
|
|
|
149
148
|
const formikContext = (0, _formik.useFormikContext)();
|
|
150
149
|
const [hasError, setHasError] = React.useState(false);
|
|
151
150
|
const handleChange = value => {
|
|
152
|
-
if (value
|
|
151
|
+
if (value) {
|
|
153
152
|
formikContext.setFieldValue(name, value);
|
|
154
153
|
onChange(value);
|
|
155
154
|
} else {
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
onChange(undefined);
|
|
155
|
+
formikContext.setFieldValue(name, null);
|
|
156
|
+
onChange(null);
|
|
159
157
|
}
|
|
160
158
|
};
|
|
161
159
|
const handleBlur = event => {
|