mirror of
https://github.com/tenrok/vue2-datepicker.git
synced 2026-06-23 12:40:37 +03:00
fix: clear text error (#544)
This commit is contained in:
+6
-3
@@ -331,11 +331,14 @@ export default {
|
|||||||
this.emitValue(val, this.validMultipleType ? `multiple-${type}` : type);
|
this.emitValue(val, this.validMultipleType ? `multiple-${type}` : type);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleClear(evt) {
|
clear() {
|
||||||
evt.stopPropagation();
|
|
||||||
this.emitValue(this.range ? [null, null] : null);
|
this.emitValue(this.range ? [null, null] : null);
|
||||||
this.$emit('clear');
|
this.$emit('clear');
|
||||||
},
|
},
|
||||||
|
handleClear(evt) {
|
||||||
|
evt.stopPropagation();
|
||||||
|
this.clear();
|
||||||
|
},
|
||||||
handleConfirmDate() {
|
handleConfirmDate() {
|
||||||
const value = this.emitValue(this.currentValue);
|
const value = this.emitValue(this.currentValue);
|
||||||
this.$emit('confirm', value);
|
this.$emit('confirm', value);
|
||||||
@@ -378,7 +381,7 @@ export default {
|
|||||||
const text = this.userInput.trim();
|
const text = this.userInput.trim();
|
||||||
this.userInput = null;
|
this.userInput = null;
|
||||||
if (text === '') {
|
if (text === '') {
|
||||||
this.handleClear();
|
this.clear();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let date;
|
let date;
|
||||||
|
|||||||
Reference in New Issue
Block a user