Fix: set dateInput value secara langsung untuk override browser cache/autofill

This commit is contained in:
mwpn
2025-12-19 05:17:46 +07:00
parent cdb9ce3a46
commit 2a5bdc0475
2 changed files with 16 additions and 0 deletions

View File

@@ -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();