@seafile/seafile-calendar 0.0.88882 → 0.0.88889
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.
package/dist/rc-calendar.js
CHANGED
@@ -7306,7 +7306,6 @@ var DateInput = function (_React$Component) {
|
|
7306
7306
|
_this.state = {
|
7307
7307
|
str: Object(__WEBPACK_IMPORTED_MODULE_9__util__["a" /* formatDate */])(selectedValue, _this.props.format),
|
7308
7308
|
hasFocus: false,
|
7309
|
-
emptyValue: false,
|
7310
7309
|
localFormat: _this.props.format[0]
|
7311
7310
|
};
|
7312
7311
|
return _this;
|
@@ -7417,11 +7416,9 @@ var _initialiseProps = function _initialiseProps() {
|
|
7417
7416
|
// 没有内容,合法并直接退出
|
7418
7417
|
|
7419
7418
|
if (!str || !calendarStr) {
|
7420
|
-
_this2.setState({ emptyValue: true });
|
7421
7419
|
_this2.onClear();
|
7422
7420
|
return;
|
7423
7421
|
}
|
7424
|
-
if (_this2.state.emptyValue) _this2.setState({ emptyValue: false });
|
7425
7422
|
var parsed = __WEBPACK_IMPORTED_MODULE_8_dayjs___default()(calendarStr, format[0]);
|
7426
7423
|
var value = _this2.props.value.clone();
|
7427
7424
|
value = value.year(parsed.year()).month(parsed.month()).date(parsed.date()).hour(parsed.hour()).minute(parsed.minute()).second(parsed.second());
|
@@ -7461,11 +7458,7 @@ var _initialiseProps = function _initialiseProps() {
|
|
7461
7458
|
if (keyCode === __WEBPACK_IMPORTED_MODULE_6_rc_util_es_KeyCode__["a" /* default */].ENTER && onSelect) {
|
7462
7459
|
var validateDate = !disabledDate || !disabledDate(value);
|
7463
7460
|
if (validateDate) {
|
7464
|
-
|
7465
|
-
onSelect(null);
|
7466
|
-
} else {
|
7467
|
-
onSelect(value.clone());
|
7468
|
-
}
|
7461
|
+
onSelect(value.clone());
|
7469
7462
|
}
|
7470
7463
|
event.preventDefault();
|
7471
7464
|
}
|