@seafile/seafile-calendar 0.0.88881 → 0.0.88882

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.
@@ -7421,7 +7421,7 @@ var _initialiseProps = function _initialiseProps() {
7421
7421
  _this2.onClear();
7422
7422
  return;
7423
7423
  }
7424
- if (emptyValue) _this2.setState({ emptyValue: false });
7424
+ if (_this2.state.emptyValue) _this2.setState({ emptyValue: false });
7425
7425
  var parsed = __WEBPACK_IMPORTED_MODULE_8_dayjs___default()(calendarStr, format[0]);
7426
7426
  var value = _this2.props.value.clone();
7427
7427
  value = value.year(parsed.year()).month(parsed.month()).date(parsed.date()).hour(parsed.hour()).minute(parsed.minute()).second(parsed.second());
@@ -7461,10 +7461,11 @@ var _initialiseProps = function _initialiseProps() {
7461
7461
  if (keyCode === __WEBPACK_IMPORTED_MODULE_6_rc_util_es_KeyCode__["a" /* default */].ENTER && onSelect) {
7462
7462
  var validateDate = !disabledDate || !disabledDate(value);
7463
7463
  if (validateDate) {
7464
- if (emptyValue) {
7464
+ if (_this2.state.emptyValue) {
7465
7465
  onSelect(null);
7466
+ } else {
7467
+ onSelect(value.clone());
7466
7468
  }
7467
- onSelect(value.clone());
7468
7469
  }
7469
7470
  event.preventDefault();
7470
7471
  }