@seafile/seafile-calendar 0.0.31-Apph0.36 → 0.0.31-Apph0.37

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.
@@ -7390,6 +7390,7 @@ var _initialiseProps = function _initialiseProps() {
7390
7390
  };
7391
7391
 
7392
7392
  this.onInputChange = function (event) {
7393
+ console.log(_this2.props);
7393
7394
  var str = event.target.value;
7394
7395
  var calendarStr = Object(__WEBPACK_IMPORTED_MODULE_9__util__["g" /* initializeStr */])(str, _this2.state.localFormat) || '';
7395
7396
  var _props = _this2.props,
@@ -7399,12 +7400,12 @@ var _initialiseProps = function _initialiseProps() {
7399
7400
  selectedValue = _props.selectedValue;
7400
7401
 
7401
7402
  // 没有内容,合法并直接退出
7402
- // if (!str) {
7403
- // onChange(null);
7404
- // this.setState({ str: '' });
7405
- // return;
7406
- // }
7407
7403
 
7404
+ if (!str) {
7405
+ onChange(__WEBPACK_IMPORTED_MODULE_8_dayjs___default()());
7406
+ _this2.setState({ str: '' });
7407
+ return;
7408
+ }
7408
7409
  var parsed = __WEBPACK_IMPORTED_MODULE_8_dayjs___default()(calendarStr, format[0]);
7409
7410
  var value = _this2.props.value.clone();
7410
7411
  value = value.year(parsed.year()).month(parsed.month()).date(parsed.date()).hour(parsed.hour()).minute(parsed.minute()).second(parsed.second());