From 89f9f10304edb0ef67382989762bfdb74241fc62 Mon Sep 17 00:00:00 2001 From: Gerhard Date: Sat, 25 Jan 2020 20:11:13 +0100 Subject: [PATCH] Fixed broken today button in the Calendar component When clicking the today button in the calendar there was a broken reference to the event. --- src/components/calendar/Calendar.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/calendar/Calendar.vue b/src/components/calendar/Calendar.vue index bbebf094f4..75fb262fc7 100644 --- a/src/components/calendar/Calendar.vue +++ b/src/components/calendar/Calendar.vue @@ -695,7 +695,10 @@ export default { } DomHandler.find(this.$refs.overlay, '.p-datepicker-calendar td span:not(.p-disabled)').forEach(cell => cell.tabIndex = -1); - event.currentTarget.focus(); + + if (event) { + event.currentTarget.focus(); + } if (this.isMultipleSelection() && this.isSelected(dateMeta)) { let newValue = this.value.filter(date => !this.isDateEquals(date, dateMeta));