Open the until-date picker on today's local date (#405)
Beta — Codeberg pre-release / detect (push) Successful in 10s
Beta — Codeberg pre-release / beta (push) Skipped

The repeat-until picker defaulted to today's UTC date, so near midnight it opened on yesterday or tomorrow depending on the zone. It now uses the device zone's today.

Co-authored-by: Jean-Luc Makiola <business@jeanlucmakiola.de>
Reviewed-on: https://codeberg.org/jlmakiola/calendula/pulls/405
This commit is contained in:
Jean-Luc Makiola
2026-10-15 16:25:12 +02:00
co-authored by makiolaj
parent 440f85d89f
commit aca048e593
@@ -159,7 +159,6 @@ import de.jeanlucmakiola.calendula.ui.common.eventFormFieldLabel
import de.jeanlucmakiola.floret.components.FullScreenPicker
import de.jeanlucmakiola.floret.components.GroupedRow
import de.jeanlucmakiola.floret.components.GroupedSurface
import de.jeanlucmakiola.calendula.ui.common.MILLIS_PER_DAY
import de.jeanlucmakiola.floret.components.InlineTextField
import de.jeanlucmakiola.floret.components.OptionCard
import de.jeanlucmakiola.floret.components.OptionPicker
@@ -1910,9 +1909,8 @@ private fun RecurrencePickerDialog(
if (showUntilPicker) {
CalendarDatePickerDialog(
initial = untilDate ?: LocalDate.fromEpochDays(
(Clock.System.now().toEpochMilliseconds() / MILLIS_PER_DAY).toInt(),
),
initial = untilDate
?: Clock.System.now().toLocalDateTime(TimeZone.currentSystemDefault()).date,
onConfirm = {
untilIso = it.toString()
showUntilPicker = false