Fixed #3962 - Calendar: updateFocus called on unmounted instance

pull/4452/head
Tuğçe Küçükoğlu 2023-08-15 10:49:50 +03:00
parent c68ceee2ac
commit a708ab9080
1 changed files with 9 additions and 7 deletions

View File

@ -2044,13 +2044,15 @@ export default {
cell = selectedCell || cells[0];
}
else {
cell = DomHandler.findSingle(this.$refs.overlay, 'span.p-highlight');
if (!cell) {
let todayCell = DomHandler.findSingle(this.$refs.overlay, 'td.p-datepicker-today span:not(.p-disabled):not(.p-ink)');
if (todayCell)
cell = todayCell;
else
cell = DomHandler.findSingle(this.$refs.overlay, '.p-datepicker-calendar td span:not(.p-disabled):not(.p-ink');
if (this.$refs.overlay) {
cell = DomHandler.findSingle(this.$refs.overlay, 'span.p-highlight');
if (!cell) {
let todayCell = DomHandler.findSingle(this.$refs.overlay, 'td.p-datepicker-today span:not(.p-disabled):not(.p-ink)');
if (todayCell)
cell = todayCell;
else
cell = DomHandler.findSingle(this.$refs.overlay, '.p-datepicker-calendar td span:not(.p-disabled):not(.p-ink');
}
}
}