diff --git a/resources/views/finance/vehicle-logs.blade.php b/resources/views/finance/vehicle-logs.blade.php index 9f4ac94e..8e1bb38b 100644 --- a/resources/views/finance/vehicle-logs.blade.php +++ b/resources/views/finance/vehicle-logs.blade.php @@ -60,6 +60,14 @@ function VehicleLogsManagement() { const { vehicles, tripTypes, locationTypes } = window.INITIAL_DATA; + // 날짜를 YYYY-MM-DD 형식으로 포맷 (로컬 시간대 사용) + const formatDate = (date) => { + const year = date.getFullYear(); + const month = String(date.getMonth() + 1).padStart(2, '0'); + const day = String(date.getDate()).padStart(2, '0'); + return `${year}-${month}-${day}`; + }; + // 이번 달 시작일/종료일 계산 const getMonthRange = (date) => { const year = date.getFullYear(); @@ -67,8 +75,8 @@ function VehicleLogsManagement() { const firstDay = new Date(year, month, 1); const lastDay = new Date(year, month + 1, 0); return { - start: firstDay.toISOString().split('T')[0], - end: lastDay.toISOString().split('T')[0] + start: formatDate(firstDay), + end: formatDate(lastDay) }; }; @@ -157,7 +165,7 @@ function VehicleLogsManagement() { }; const handleAdd = () => { - const today = new Date().toISOString().split('T')[0]; + const today = formatDate(new Date()); setModalMode('add'); setEditingItem(null);