Commit 4cc72ddba577de79f315fb717aeccb16c19d8c9f
1 parent
3e012ca9
fix #5046
Showing
2 changed files
with
5 additions
and
0 deletions
Show diff stats
src/components/date-picker/base/confirm.vue
| @@ -55,6 +55,7 @@ | @@ -55,6 +55,7 @@ | ||
| 55 | if (this.timeDisabled) return; | 55 | if (this.timeDisabled) return; |
| 56 | this.$emit('on-pick-toggle-time'); | 56 | this.$emit('on-pick-toggle-time'); |
| 57 | this.dispatch('CalendarPicker', 'focus-input'); | 57 | this.dispatch('CalendarPicker', 'focus-input'); |
| 58 | + this.dispatch('CalendarPicker', 'update-popper'); | ||
| 58 | }, | 59 | }, |
| 59 | handleTab(e) { | 60 | handleTab(e) { |
| 60 | const tabbables = [...this.$el.children]; | 61 | const tabbables = [...this.$el.children]; |
src/components/date-picker/picker.vue
| @@ -679,6 +679,9 @@ | @@ -679,6 +679,9 @@ | ||
| 679 | }, | 679 | }, |
| 680 | focus() { | 680 | focus() { |
| 681 | this.$refs.input && this.$refs.input.focus(); | 681 | this.$refs.input && this.$refs.input.focus(); |
| 682 | + }, | ||
| 683 | + updatePopper () { | ||
| 684 | + this.$refs.drop.update(); | ||
| 682 | } | 685 | } |
| 683 | }, | 686 | }, |
| 684 | watch: { | 687 | watch: { |
| @@ -715,6 +718,7 @@ | @@ -715,6 +718,7 @@ | ||
| 715 | 718 | ||
| 716 | // to handle focus from confirm buttons | 719 | // to handle focus from confirm buttons |
| 717 | this.$on('focus-input', () => this.focus()); | 720 | this.$on('focus-input', () => this.focus()); |
| 721 | + this.$on('update-popper', () => this.updatePopper()); | ||
| 718 | } | 722 | } |
| 719 | }; | 723 | }; |
| 720 | </script> | 724 | </script> |