diff --git a/src/modules/03_logs/components/LogTable.vue b/src/modules/03_logs/components/LogTable.vue index f0945375..2bbc88b0 100644 --- a/src/modules/03_logs/components/LogTable.vue +++ b/src/modules/03_logs/components/LogTable.vue @@ -199,8 +199,8 @@ function handleScroll() { searchAfter: searchAfter.value ?? undefined, sort: sortTime.value, // date: new Date(startDate.value), - startDate: new Date(startDate.value), - endDate: new Date(endDate.value), + startDate: new Date(startDate.value) ?? undefined, + endDate: new Date(endDate.value) ?? undefined, }, true ); @@ -331,6 +331,11 @@ function updateDate() { onMounted(() => { systemName.value = route.query.system as string; + const date = new Date(); + date.setHours(0, 0, 0, 0); // ตั้งเวลาเป็น 00:00:00.000 + + startDate.value = date.toISOString(); // แปลงเป็น ISO string + endDate.value = new Date().toISOString(); });