From ef129eb54228c67253f250fa5d57f4b66ce57c1b Mon Sep 17 00:00:00 2001 From: jorgep Date: Wed, 29 Jan 2025 14:38:58 +0100 Subject: [PATCH] fix: refs #8198 correct date comparison in getBadgeAttrs function --- src/pages/Item/Card/ItemDiary.vue | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/pages/Item/Card/ItemDiary.vue b/src/pages/Item/Card/ItemDiary.vue index 3e8b1f676..4b6775183 100644 --- a/src/pages/Item/Card/ItemDiary.vue +++ b/src/pages/Item/Card/ItemDiary.vue @@ -143,7 +143,7 @@ onMounted(async () => { const fetchItemBalances = async () => await arrayDataItemBalances.fetch({}); const getBadgeAttrs = (_date) => { - const isSameDate = date.isSameDate(today.value, _date); + const isSameDate = date.isSameDate(today, _date); const attrs = { 'text-color': isSameDate ? 'black' : 'white', color: isSameDate ? 'warning' : 'transparent', @@ -153,8 +153,6 @@ const getBadgeAttrs = (_date) => { const scrollToToday = async () => { await nextTick(); - const today = Date.vnNew(); - today.setHours(0, 0, 0, 0); const todayCell = document.querySelector(`td[data-date="${today.toISOString()}"]`); if (todayCell) { todayCell.scrollIntoView({ behavior: 'smooth', block: 'center' });