Skip to content

Commit

Permalink
fix: clear text error (#544)
Browse files Browse the repository at this point in the history
  • Loading branch information
mengxiong10 committed Nov 23, 2020
1 parent 2eea21f commit bcc4f77
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/date-picker.js
Original file line number Diff line number Diff line change
Expand Up @@ -331,11 +331,14 @@ export default {
this.emitValue(val, this.validMultipleType ? `multiple-${type}` : type);
}
},
handleClear(evt) {
evt.stopPropagation();
clear() {
this.emitValue(this.range ? [null, null] : null);
this.$emit('clear');
},
handleClear(evt) {
evt.stopPropagation();
this.clear();
},
handleConfirmDate() {
const value = this.emitValue(this.currentValue);
this.$emit('confirm', value);
Expand Down Expand Up @@ -378,7 +381,7 @@ export default {
const text = this.userInput.trim();
this.userInput = null;
if (text === '') {
this.handleClear();
this.clear();
return;
}
let date;
Expand Down

0 comments on commit bcc4f77

Please sign in to comment.