@seafile/seafile-calendar 0.0.31-Apph0.25 → 0.0.31-Apph0.27
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 +8 -13
- package/dist/rc-calendar.js.map +1 -1
- package/dist/rc-calendar.min.js +1 -1
- package/es/date/DateInput.js +7 -13
- package/es/util/index.js +1 -0
- package/lib/date/DateInput.js +7 -13
- package/lib/util/index.js +1 -0
- package/package.json +1 -1
package/dist/rc-calendar.js
CHANGED
@@ -614,6 +614,7 @@ function getDatePart(str) {
|
|
614
614
|
|
615
615
|
function initializeStr(str, format) {
|
616
616
|
var inputStr = str;
|
617
|
+
if (!inputStr) return '';
|
617
618
|
var inputStrLength = inputStr.length;
|
618
619
|
var time = getCurrentTime();
|
619
620
|
var hasSpecial = hasSpecialChar(inputStr);
|
@@ -7330,11 +7331,8 @@ var DateInput = function (_React$Component) {
|
|
7330
7331
|
prefixCls = props.prefixCls,
|
7331
7332
|
placeholder = props.placeholder,
|
7332
7333
|
clearIcon = props.clearIcon,
|
7333
|
-
inputMode = props.inputMode
|
7334
|
-
defaultValue = props.defaultValue;
|
7334
|
+
inputMode = props.inputMode;
|
7335
7335
|
|
7336
|
-
console.log('defaultValue', defaultValue);
|
7337
|
-
console.log('str', str);
|
7338
7336
|
|
7339
7337
|
return __WEBPACK_IMPORTED_MODULE_3_react___default.a.createElement(
|
7340
7338
|
'div',
|
@@ -7384,7 +7382,8 @@ DateInput.propTypes = {
|
|
7384
7382
|
onSelect: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.func,
|
7385
7383
|
selectedValue: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.object,
|
7386
7384
|
clearIcon: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.node,
|
7387
|
-
inputMode: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.string
|
7385
|
+
inputMode: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.string,
|
7386
|
+
defaultValue: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.object
|
7388
7387
|
};
|
7389
7388
|
|
7390
7389
|
var _initialiseProps = function _initialiseProps() {
|
@@ -7402,17 +7401,13 @@ var _initialiseProps = function _initialiseProps() {
|
|
7402
7401
|
disabledDate = _props.disabledDate,
|
7403
7402
|
format = _props.format,
|
7404
7403
|
onChange = _props.onChange,
|
7405
|
-
selectedValue = _props.selectedValue
|
7404
|
+
selectedValue = _props.selectedValue,
|
7405
|
+
defaultValue = _props.defaultValue;
|
7406
7406
|
|
7407
|
-
console.log('
|
7408
|
-
// 没有内容,合法并直接退出
|
7409
|
-
if (!str) {
|
7410
|
-
onChange(null);
|
7411
|
-
_this2.setState({ str: '' });
|
7412
|
-
return;
|
7413
|
-
}
|
7407
|
+
console.log('calendarStr', calendarStr);
|
7414
7408
|
var parsed = __WEBPACK_IMPORTED_MODULE_8_dayjs___default()(calendarStr, format[0]);
|
7415
7409
|
var value = _this2.props.value.clone();
|
7410
|
+
console.log('value', value);
|
7416
7411
|
value = value.year(parsed.year()).month(parsed.month()).date(parsed.date()).hour(parsed.hour()).minute(parsed.minute()).second(parsed.second());
|
7417
7412
|
|
7418
7413
|
if (!value || disabledDate && disabledDate(value)) {
|