diff --git a/src/date-picker.vue b/src/date-picker.vue index ad2ce19e..e988fc54 100644 --- a/src/date-picker.vue +++ b/src/date-picker.vue @@ -8,19 +8,47 @@ }" >
- + @@ -456,10 +484,15 @@ export default { this.$emit('update:open', false); }, blur() { - this.$refs.input.blur(); + // when use slot input + if (this.$refs.input) { + this.$refs.input.blur(); + } }, focus() { - this.$refs.input.focus(); + if (this.$refs.input) { + this.$refs.input.focus(); + } }, handleInputChange() { if (!this.editable || this.userInput === null) return;