@seafile/seafile-calendar 0.0.8881 → 0.0.8883

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.
@@ -2836,9 +2836,10 @@ var Calendar = function (_React$Component) {
2836
2836
  timePickerEle = __WEBPACK_IMPORTED_MODULE_4_react___default.a.cloneElement(timePicker, timePickerProps);
2837
2837
  }
2838
2838
  var calendarInputPlaceholder = dateInputPlaceholder || (Array.isArray(this.getFormat()) ? this.getFormat()[0] : this.getFormat());
2839
+ var inputFormat = Array.isArray(this.getFormat()) ? this.getFormat() : [this.getFormat()];
2839
2840
 
2840
2841
  var dateInputElement = props.showDateInput ? __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_16__date_DateInput__["a" /* default */], {
2841
- format: this.getFormat(),
2842
+ format: inputFormat,
2842
2843
  key: 'date-input',
2843
2844
  value: value,
2844
2845
  locale: locale,
@@ -2937,7 +2938,7 @@ var Calendar = function (_React$Component) {
2937
2938
  onSelect: this.onDateTableSelect,
2938
2939
  onClickRightPanelTime: onClickRightPanelTime,
2939
2940
  defaultMinutesTime: this.props.defaultMinutesTime,
2940
- format: this.getFormat()
2941
+ format: inputFormat
2941
2942
  })
2942
2943
  )
2943
2944
  ));
@@ -7403,7 +7404,6 @@ var _initialiseProps = function _initialiseProps() {
7403
7404
  var _this2 = this;
7404
7405
 
7405
7406
  this.onClear = function () {
7406
- console.log('onClear');
7407
7407
  _this2.setState({ str: '' });
7408
7408
  _this2.props.onClear(null);
7409
7409
  };
@@ -7419,11 +7419,7 @@ var _initialiseProps = function _initialiseProps() {
7419
7419
  shouldDisplayCurrent = _props.shouldDisplayCurrent;
7420
7420
  // 没有内容,合法并直接退出
7421
7421
 
7422
- console.log('str', str);
7423
- console.log('calendarStr', calendarStr);
7424
-
7425
- if (!str) {
7426
- console.log('没有内容,合法并直接退出');
7422
+ if (!str || !calendarStr) {
7427
7423
  if (shouldDisplayCurrent) {
7428
7424
  _this2.setState({ str: '' });
7429
7425
  onChange(__WEBPACK_IMPORTED_MODULE_8_dayjs___default()());