fix(#7): use UTC for DateField initial seed to match pick conversion

DateField seeded the picker with ZoneId.systemDefault() but converted
the selectedDateMillis back with ZoneId.of("UTC"). For any non-UTC
user, the field and the picker displayed different days, and
confirming without re-picking silently shifted the export range by a
day. Use UTC on both sides (the DatePickerState contract is that
selectedDateMillis is UTC midnight of the picked day).
This commit is contained in:
Achmad Setyabudi Susilo
2026-06-28 18:27:49 +07:00
parent 7782df8b36
commit ce01c175df
@@ -185,7 +185,7 @@ private fun DateField(
)
if (showPicker) {
val initialMillis = date.atStartOfDay(ZoneId.systemDefault())
val initialMillis = date.atStartOfDay(ZoneId.of("UTC"))
.toInstant()
.toEpochMilli()
val datePickerState = rememberDatePickerState(initialSelectedDateMillis = initialMillis)