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

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.
@@ -103,7 +103,6 @@ var DateInput = function (_React$Component) {
103
103
  clearIcon = props.clearIcon,
104
104
  inputMode = props.inputMode;
105
105
 
106
-
107
106
  return _react2['default'].createElement(
108
107
  'div',
109
108
  { className: prefixCls + '-input-wrap' },
@@ -152,8 +151,7 @@ DateInput.propTypes = {
152
151
  onSelect: _propTypes2['default'].func,
153
152
  selectedValue: _propTypes2['default'].object,
154
153
  clearIcon: _propTypes2['default'].node,
155
- inputMode: _propTypes2['default'].string,
156
- defaultInputValue: _propTypes2['default'].object
154
+ inputMode: _propTypes2['default'].string
157
155
  };
158
156
 
159
157
  var _initialiseProps = function _initialiseProps() {
@@ -171,15 +169,21 @@ var _initialiseProps = function _initialiseProps() {
171
169
  disabledDate = _props.disabledDate,
172
170
  format = _props.format,
173
171
  onChange = _props.onChange,
174
- selectedValue = _props.selectedValue,
175
- defaultInputValue = _props.defaultInputValue;
172
+ selectedValue = _props.selectedValue;
173
+
174
+ // 没有内容,合法并直接退出
175
+ // if (!str) {
176
+ // onChange(null);
177
+ // this.setState({ str: '' });
178
+ // return;
179
+ // }
176
180
 
177
- console.log('calendarStr', !calendarStr);
178
181
  var parsed = (0, _dayjs2['default'])(calendarStr, format[0]);
179
182
  var value = _this2.props.value.clone();
180
- console.log('defaultValue', defaultInputValue);
181
183
  value = value.year(parsed.year()).month(parsed.month()).date(parsed.date()).hour(parsed.hour()).minute(parsed.minute()).second(parsed.second());
184
+ console.log('calendarStr', calendarStr);
182
185
 
186
+ console.log('value', value);
183
187
  if (!value || disabledDate && disabledDate(value)) {
184
188
  _this2.setState({ str: str });
185
189
  return;
@@ -187,9 +191,7 @@ var _initialiseProps = function _initialiseProps() {
187
191
 
188
192
  if (selectedValue !== value || selectedValue && value && !selectedValue.isSame(value)) {
189
193
  _this2.setState({ str: str });
190
- var changeVal = !calendarStr ? defaultInputValue : value;
191
- console.log('changeVal', changeVal);
192
- onChange(changeVal);
194
+ onChange(value);
193
195
  }
194
196
  };
195
197
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seafile/seafile-calendar",
3
- "version": "0.0.31Apph0.35",
3
+ "version": "0.0.31Apph0.36",
4
4
  "description": "React Calendar",
5
5
  "keywords": [
6
6
  "react",