Fixed
Status Update
Comments
ae...@google.com <ae...@google.com>
bl...@gmail.com <bl...@gmail.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.
co...@google.com <co...@google.com>
sg...@google.com <sg...@google.com>
sg...@google.com <sg...@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
na...@google.com <na...@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
ap...@google.com <ap...@google.com> #5
Hello,
I’m experiencing an issue with the DateRangePicker in Jetpack Compose Material3.
Issue Description
When using DateRangePicker in DisplayMode.Input, entering the same date in both fields (Start and End) and then clicking on the “Start date” field triggers a validation message:
“Invalid date range input”
This message cannot be dismissed when selecting the same start and end date. It makes it impossible for users to pick a single-day range in input mode.
Expected Behavior
The DateRangePicker should allow selecting the same start and end date without showing a validation error, as a one-day range is a valid selection.
Environment
• Compose Material3 version: 1.3.1
• Android Gradle Plugin version: 8.8.0
• Kotlin version: 2.1.10
• Core KTX version: 1.15.0
• Activity Compose version: 1.10.0
• Compose BOM version: 2025.01.01
Steps to Reproduce
1. Open DateRangePicker in DisplayMode.Input.
2. Enter the same date in both “Start date” and “End date” fields.
3. Click on the “Start date” field.
4. The message “Invalid date range input” appears and cannot be dismissed.
Could you please take a look at this issue? A single-day range should be a valid selection.
Thank you!
I’m experiencing an issue with the DateRangePicker in Jetpack Compose Material3.
Issue Description
When using DateRangePicker in DisplayMode.Input, entering the same date in both fields (Start and End) and then clicking on the “Start date” field triggers a validation message:
“Invalid date range input”
This message cannot be dismissed when selecting the same start and end date. It makes it impossible for users to pick a single-day range in input mode.
Expected Behavior
The DateRangePicker should allow selecting the same start and end date without showing a validation error, as a one-day range is a valid selection.
Environment
• Compose Material3 version: 1.3.1
• Android Gradle Plugin version: 8.8.0
• Kotlin version: 2.1.10
• Core KTX version: 1.15.0
• Activity Compose version: 1.10.0
• Compose BOM version: 2025.01.01
Steps to Reproduce
1. Open DateRangePicker in DisplayMode.Input.
2. Enter the same date in both “Start date” and “End date” fields.
3. Click on the “Start date” field.
4. The message “Invalid date range input” appears and cannot be dismissed.
Could you please take a look at this issue? A single-day range should be a valid selection.
Thank you!
Description
The most common use case might be showing a backdrop image in the expanded state, while showing only text in the collapsed state.