Merge pull request #1266 from Safelite/defect/CSR-1546
CSR-1546 | Make date-picker work with arrow keys
This commit is contained in:
commit
239f088261
1 changed files with 7 additions and 2 deletions
|
|
@ -44,7 +44,8 @@
|
|||
type="radio"
|
||||
name="day-of-month"
|
||||
v-model="selectedDate"
|
||||
@click="fireDateClickedEvent"
|
||||
@click="fireDateSelectedEvent"
|
||||
@keypress.enter="fireDateSelectedEvent"
|
||||
:value="date.inputValue"
|
||||
:id="`${month.monthLabel}-${date.dateNum.toString()}`" />
|
||||
<label :for="`${month.monthLabel}-${date.dateNum.toString()}`">
|
||||
|
|
@ -180,7 +181,11 @@ export default {
|
|||
initializeComponent(initialData) {
|
||||
this.setCalendarData(initialData);
|
||||
},
|
||||
fireDateClickedEvent() {
|
||||
fireDateSelectedEvent(event) {
|
||||
// Ignore if arrow key selected radioButton
|
||||
if (event.screenX === 0 && event.screenY === 0) {
|
||||
return;
|
||||
}
|
||||
this.$emit("date-clicked");
|
||||
},
|
||||
getWeekStartDate(dateString) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue