diff --git a/public/dashboard/event.html b/public/dashboard/event.html index 1d3c4b4..aea2b3a 100644 --- a/public/dashboard/event.html +++ b/public/dashboard/event.html @@ -843,6 +843,14 @@ state.date = today; console.log('[Events] Default date set to today:', state.date); + // Set dateInput value SECARA LANGSUNG untuk override browser cache/autofill + const dateInput = document.getElementById('filter-date'); + if (dateInput) { + dateInput.value = today; + dateInput.setAttribute('value', today); // Force set attribute juga + console.log('[Events] Date input set to:', today, 'actual value:', dateInput.value); + } + // Setup filters SETELAH state.date sudah di-set setupFilters(); await loadLocations(); diff --git a/public/dashboard/js/dashboard.js b/public/dashboard/js/dashboard.js index d1482bc..e0bf6d2 100644 --- a/public/dashboard/js/dashboard.js +++ b/public/dashboard/js/dashboard.js @@ -766,6 +766,14 @@ document.addEventListener('DOMContentLoaded', async () => { state.date = today; console.log('[Dashboard] Default date set to today:', state.date); + // Set dateInput value SECARA LANGSUNG untuk override browser cache/autofill + const dateInput = document.getElementById('filter-date'); + if (dateInput) { + dateInput.value = today; + dateInput.setAttribute('value', today); // Force set attribute juga + console.log('[Dashboard] Date input set to:', today, 'actual value:', dateInput.value); + } + setTopbarDate(); initCharts();