From aca048e593426c9ed2cc04f6ad71779ccde73426 Mon Sep 17 00:00:00 2001 From: Jean-Luc Makiola Date: Thu, 15 Oct 2026 16:25:12 +0200 Subject: [PATCH] Open the until-date picker on today's local date (#405) 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 Reviewed-on: https://codeberg.org/jlmakiola/calendula/pulls/405 --- .../de/jeanlucmakiola/calendula/ui/edit/EventEditScreen.kt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/de/jeanlucmakiola/calendula/ui/edit/EventEditScreen.kt b/app/src/main/java/de/jeanlucmakiola/calendula/ui/edit/EventEditScreen.kt index 37e6cae..3252cba 100644 --- a/app/src/main/java/de/jeanlucmakiola/calendula/ui/edit/EventEditScreen.kt +++ b/app/src/main/java/de/jeanlucmakiola/calendula/ui/edit/EventEditScreen.kt @@ -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