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 <business@jeanlucmakiola.de> Reviewed-on: https://codeberg.org/jlmakiola/calendula/pulls/405
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user