Skip to content

Commit

Permalink
Allow timepicker to be dismissed with ESC key (CFM-173)
Browse files Browse the repository at this point in the history
  • Loading branch information
arlen committed Jul 8, 2022
1 parent e12b4d7 commit adced64
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,11 @@ export default {
this.$emit('hide');
}
},
mounted() {
this.$refs.timepicker.focus();
},
template: `
<div class="cm-time-picker-panel" v-clickout="hide">
<div class="cm-time-picker-panel" ref="timepicker" v-clickout="hide" @keydown.esc="hide" tabindex="-1">
<div class="cm-time-picker-hours">
<div class="cm-time-picker-title">{{ txt.hour }}</div>
<div class="cm-time-picker-vals">
Expand Down

0 comments on commit adced64

Please sign in to comment.