@seafile/seafile-calendar 0.0.29-alpha74 → 0.0.29-alpha76

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.
@@ -2954,7 +2954,6 @@ var Calendar = function (_React$Component) {
2954
2954
  onSelect: this.onDateTableSelect,
2955
2955
  onClickRightPanelTime: onClickRightPanelTime,
2956
2956
  defaultMinutesTime: this.props.defaultMinutesTime,
2957
- showHourAndMinute: showHourAndMinute,
2958
2957
  format: this.getFormat()
2959
2958
  })
2960
2959
  )
@@ -6918,11 +6917,9 @@ var CalendarRightPanel = function (_React$Component) {
6918
6917
  locale = _props.locale;
6919
6918
 
6920
6919
  var selectedDate = value.format().slice(0, String(value.format()).indexOf('T'));
6921
- console.log('selectedDate', value, selectedDate);
6922
6920
  var highlight = this.state.highlightTime;
6923
6921
  var highlightTime = highlight ? highlight.format().slice(11, 16) : null;
6924
6922
  var isZhcn = locale && locale.today === '今天';
6925
- console.log('1111', '' + selectedDate);
6926
6923
  return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(
6927
6924
  'div',
6928
6925
  { className: prefixCls + '-right-panel' },
@@ -6939,7 +6936,7 @@ var CalendarRightPanel = function (_React$Component) {
6939
6936
  null,
6940
6937
  this.times.map(function (time) {
6941
6938
  var parts = Object(__WEBPACK_IMPORTED_MODULE_6__util__["d" /* formatDateLocal */])(selectedDate, _this2.state.localeFormat);
6942
- var current = __WEBPACK_IMPORTED_MODULE_5_dayjs___default()(selectedDate + ' ' + time).year(parts[0]).month(parts[1]).date(parts[2]);
6939
+ var current = __WEBPACK_IMPORTED_MODULE_5_dayjs___default()(selectedDate + ' ' + time).year(parts[0]).month(parts[1] - 1).date(parts[2]); // eslint-disable-line max-len
6943
6940
  current = isZhcn ? current.locale('zh-cn') : current.locale('en-gb');
6944
6941
  return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(
6945
6942
  'li',
@@ -6972,7 +6969,6 @@ CalendarRightPanel.propTypes = {
6972
6969
  locale: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.object,
6973
6970
  defaultMinutesTime: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.string,
6974
6971
  format: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.string)])
6975
-
6976
6972
  };
6977
6973
  /* harmony default export */ __webpack_exports__["a"] = (CalendarRightPanel);
6978
6974
 
@@ -7360,6 +7356,7 @@ var DateInput = function (_React$Component) {
7360
7356
  }
7361
7357
  }
7362
7358
  }
7359
+
7363
7360
  return newState;
7364
7361
  };
7365
7362
 
@@ -7388,7 +7385,7 @@ var DateInput = function (_React$Component) {
7388
7385
  value: str,
7389
7386
  disabled: props.disabled,
7390
7387
  placeholder: placeholder,
7391
- onChange: this.onInputChangeAll,
7388
+ onChange: this.onInputChange,
7392
7389
  onKeyDown: this.onKeyDown,
7393
7390
  onFocus: this.onFocus,
7394
7391
  onBlur: this.onBlur,
@@ -7438,7 +7435,8 @@ var _initialiseProps = function _initialiseProps() {
7438
7435
  _this2.props.onClear(null);
7439
7436
  };
7440
7437
 
7441
- this.onInputChange = function (str) {
7438
+ this.onInputChange = function (event) {
7439
+ var str = event.target.value;
7442
7440
  var cananderStr = Object(__WEBPACK_IMPORTED_MODULE_9__util__["l" /* normalizeDateInput */])(str, _this2.state.localeFormat, _this2.state.delimiter);
7443
7441
  var _props = _this2.props,
7444
7442
  disabledDate = _props.disabledDate,
@@ -7476,17 +7474,11 @@ var _initialiseProps = function _initialiseProps() {
7476
7474
  }
7477
7475
 
7478
7476
  if (selectedValue !== value || selectedValue && value && !selectedValue.isSame(value)) {
7479
- // console.log(123)
7480
7477
  _this2.setState({ str: str });
7481
7478
  onChange(value);
7482
7479
  }
7483
7480
  };
7484
7481
 
7485
- this.onInputChangeAll = function (event) {
7486
- var str = event.target.value;
7487
- _this2.onInputChange(str);
7488
- };
7489
-
7490
7482
  this.onFocus = function () {
7491
7483
  _this2.setState({ hasFocus: true });
7492
7484
  };