Fix: tambah final check untuk pastikan dateInput tetap hari ini setelah semua async operations

This commit is contained in:
mwpn
2025-12-19 05:31:56 +07:00
parent 514bc9b176
commit 7180371316

View File

@@ -831,6 +831,14 @@ document.addEventListener('DOMContentLoaded', async () => {
showVideoPanel(state.locationCode);
await loadSummaryAndCharts();
// FINAL CHECK: Pastikan dateInput masih hari ini setelah semua async operations
const finalDateInput = document.getElementById('filter-date');
if (finalDateInput && finalDateInput.value !== state.date) {
console.warn('[Dashboard] Date input value changed after async operations, resetting to:', state.date);
finalDateInput.value = state.date;
finalDateInput.setAttribute('value', state.date);
}
});