Fix: tambah final check untuk pastikan dateInput tetap hari ini setelah semua async operations
This commit is contained in:
@@ -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);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user