@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.
- package/dist/rc-calendar.js +13 -14
- package/dist/rc-calendar.js.map +1 -1
- package/dist/rc-calendar.min.js +1 -1
- package/es/Calendar.js +1 -4
- package/es/Picker.js +0 -2
- package/es/date/DateInput.js +12 -10
- package/lib/Calendar.js +1 -4
- package/lib/Picker.js +0 -2
- package/lib/date/DateInput.js +12 -10
- package/package.json +1 -1
package/lib/date/DateInput.js
CHANGED
@@ -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
|
-
|
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
|
-
|
191
|
-
console.log('changeVal', changeVal);
|
192
|
-
onChange(changeVal);
|
194
|
+
onChange(value);
|
193
195
|
}
|
194
196
|
};
|
195
197
|
|