@seafile/seafile-calendar 1.0.10 → 1.0.11-beta.1

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/es/Calendar.js CHANGED
@@ -137,7 +137,7 @@ var Calendar = function (_React$Component) {
137
137
  value: value,
138
138
  locale: locale,
139
139
  placeholder: headerDatePlaceholder,
140
- showClear: true,
140
+ showClear: mode === 'date',
141
141
  disabledTime: disabledTime,
142
142
  disabledDate: disabledDate,
143
143
  onClear: this.onClear,
@@ -367,9 +367,10 @@ var _initialiseProps = function _initialiseProps() {
367
367
  };
368
368
 
369
369
  this.onClear = function () {
370
- _this2.onSelect(null);
371
- _this2.props.onClear();
372
- _this2.setState({ currentStatus: CALENDAR_STATUS.CURRENT_TIME });
370
+ console.log('onClear');
371
+ // this.onSelect(null);
372
+ // this.props.onClear();
373
+ // this.setState({ currentStatus: CALENDAR_STATUS.CURRENT_TIME });
373
374
  };
374
375
 
375
376
  this.onOk = function () {
@@ -142,7 +142,8 @@ DateInput.propTypes = {
142
142
  var _initialiseProps = function _initialiseProps() {
143
143
  var _this3 = this;
144
144
 
145
- this.onClear = function () {
145
+ this.onClear = function (e) {
146
+ e && e.stopPropagation();
146
147
  _this3.setState({ str: '' });
147
148
  _this3.props.onClear(null);
148
149
  };
package/lib/Calendar.js CHANGED
@@ -201,7 +201,7 @@ var Calendar = function (_React$Component) {
201
201
  value: value,
202
202
  locale: locale,
203
203
  placeholder: headerDatePlaceholder,
204
- showClear: true,
204
+ showClear: mode === 'date',
205
205
  disabledTime: disabledTime,
206
206
  disabledDate: disabledDate,
207
207
  onClear: this.onClear,
@@ -431,9 +431,10 @@ var _initialiseProps = function _initialiseProps() {
431
431
  };
432
432
 
433
433
  this.onClear = function () {
434
- _this2.onSelect(null);
435
- _this2.props.onClear();
436
- _this2.setState({ currentStatus: _util.CALENDAR_STATUS.CURRENT_TIME });
434
+ console.log('onClear');
435
+ // this.onSelect(null);
436
+ // this.props.onClear();
437
+ // this.setState({ currentStatus: CALENDAR_STATUS.CURRENT_TIME });
437
438
  };
438
439
 
439
440
  this.onOk = function () {
@@ -174,7 +174,8 @@ DateInput.propTypes = {
174
174
  var _initialiseProps = function _initialiseProps() {
175
175
  var _this3 = this;
176
176
 
177
- this.onClear = function () {
177
+ this.onClear = function (e) {
178
+ e && e.stopPropagation();
178
179
  _this3.setState({ str: '' });
179
180
  _this3.props.onClear(null);
180
181
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seafile/seafile-calendar",
3
- "version": "1.0.10",
3
+ "version": "1.0.11-beta.1",
4
4
  "description": "React Calendar",
5
5
  "keywords": [
6
6
  "react",