@seafile/seafile-calendar 0.0.31-Apph0.59 → 0.0.31-Apph0.60

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.
@@ -3081,8 +3081,12 @@ var _initialiseProps = function _initialiseProps() {
3081
3081
  }
3082
3082
  };
3083
3083
 
3084
- this.onClear = function () {
3085
- _this2.onSelect(null);
3084
+ this.onClear = function (value, shouldDisplayCurrent) {
3085
+ if (shouldDisplayCurrent) {
3086
+ _this2.onSelect(value || __WEBPACK_IMPORTED_MODULE_9_dayjs___default()());
3087
+ } else {
3088
+ _this2.onSelect(null);
3089
+ }
3086
3090
  _this2.props.onClear();
3087
3091
  _this2.setState({ currentStatus: 1 });
3088
3092
  };
@@ -7419,16 +7423,14 @@ var _initialiseProps = function _initialiseProps() {
7419
7423
  format = _props.format,
7420
7424
  onChange = _props.onChange,
7421
7425
  selectedValue = _props.selectedValue,
7422
- shouldDisplayCurrent = _props.shouldDisplayCurrent,
7423
- openValue = _props.openValue,
7424
- onClear = _props.onClear;
7426
+ shouldDisplayCurrent = _props.shouldDisplayCurrent;
7425
7427
 
7426
7428
  console.log('openValue', openValue);
7427
7429
  // 没有内容,合法并直接退出
7428
7430
  if (!str || !calendarStr) {
7429
7431
  if (shouldDisplayCurrent) {
7430
7432
  _this2.setState({ str: '' });
7431
- onClear(openValue);
7433
+ _this2.props.onClear(openValue, shouldDisplayCurrent);
7432
7434
  return;
7433
7435
  }
7434
7436
  _this2.onClear();