diff --git a/src/pages/Item/Card/ItemDiary.vue b/src/pages/Item/Card/ItemDiary.vue index 83cd562a0..f839c1f71 100644 --- a/src/pages/Item/Card/ItemDiary.vue +++ b/src/pages/Item/Card/ItemDiary.vue @@ -158,15 +158,10 @@ const getBadgeAttrs = (_date) => { const scrollToToday = async () => { await nextTick(); - const todayCell = document.querySelector(`td[data-date="${today.toISOString()}"]`); - if (todayCell) { - todayCell.scrollIntoView({ behavior: 'smooth', block: 'center' }); - } -}; - -const formatDateForAttribute = (dateValue) => { - if (dateValue instanceof Date) return date.formatDate(dateValue, 'YYYY-MM-DD'); - return dateValue; + const todayCell = document.querySelector( + `td[data-date="${date.formatDate(today, 'YYYY-MM-DD')}"]`, + ); + if (todayCell) todayCell.scrollIntoView({ behavior: 'smooth', block: 'center' }); }; async function updateWarehouse(warehouseFk) { @@ -242,7 +237,7 @@ async function updateWarehouse(warehouseFk) {