Fix: set dateInput value secara langsung untuk override browser cache/autofill
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user