Fixed
Status Update
Comments
ma...@google.com <ma...@google.com>
sg...@google.com <sg...@google.com>
sg...@google.com <sg...@google.com> #2
Thanks for your feedback! Initially, the intention was to limit the date range picker to ranges of dates without the option to select the same date for start and end. However, your feedback have triggered a few additional discussions and we will make the change to allow that.
ap...@google.com <ap...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-main
commit 3aef71f0bb035d22907c9eb1011803515271822e
Author: Shalom Gibly <sgibly@google.com>
Date: Tue Mar 14 12:29:28 2023
DateRangePicker - allow same day range selection
Updates to the DateRangePicker to allow slecting the same date as a
start and end.
Bug: 272882497
Test: DateRangePickerTest
Relnote: "Updated the DateRangePicker to allow selecting a range with
the same date for its start and end."
Change-Id: I16529402422cca8b5a370483fa14e4f429548e7c
M compose/material3/material3/src/androidAndroidTest/kotlin/androidx/compose/material3/DateRangePickerTest.kt
M compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/DatePicker.kt
M compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/DateRangePicker.kt
https://android-review.googlesource.com/2487965
Branch: androidx-main
commit 3aef71f0bb035d22907c9eb1011803515271822e
Author: Shalom Gibly <sgibly@google.com>
Date: Tue Mar 14 12:29:28 2023
DateRangePicker - allow same day range selection
Updates to the DateRangePicker to allow slecting the same date as a
start and end.
Bug: 272882497
Test: DateRangePickerTest
Relnote: "Updated the DateRangePicker to allow selecting a range with
the same date for its start and end."
Change-Id: I16529402422cca8b5a370483fa14e4f429548e7c
M compose/material3/material3/src/androidAndroidTest/kotlin/androidx/compose/material3/DateRangePickerTest.kt
M compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/DatePicker.kt
M compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/DateRangePicker.kt
sg...@google.com <sg...@google.com>
pr...@google.com <pr...@google.com> #4
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.compose.material3:material3:1.1.0-beta01
Description
DateRangePicker
doesn't allow selecting a range of 1 day (a range starting and ending on the same day). Date range picker fromcom.google.android.material:material:1.8.0
allows 1-day ranges. Another example is the Pixel clock app allows 1-day ranges when pausing alarms. In general this is a valid edge use case.Looks like
DateInputValidator
marks a range like this invalid, but it's unclear if this is on purpose. The code is surrounded with comments that say "Additional validation when the InputIdentifier is for start of end dates in a range input" and "The input start date is after the end date, or the end date is before the start date." which strikes me as something where the intent wasn't to also reject when start date and end date are equal.