2
0
mirror of https://github.com/tenrok/vue2-datepicker.git synced 2026-06-11 07:42:27 +03:00

fix: clear text error

This commit is contained in:
mengxiong10
2020-11-23 14:34:34 +08:00
parent 4a3aa12436
commit aaee1172a7
+6 -3
View File
@@ -351,11 +351,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);
@@ -398,7 +401,7 @@ export default {
const text = this.userInput.trim();
this.userInput = null;
if (text === '') {
this.handleClear();
this.clear();
return;
}
let date;