Status Update
Comments
kd...@google.com <kd...@google.com>
je...@google.com <je...@google.com>
hu...@google.com <hu...@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.
ph...@gmail.com <ph...@gmail.com> #3
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
ph...@gmail.com <ph...@gmail.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
hu...@google.com <hu...@google.com> #5
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!
ph...@gmail.com <ph...@gmail.com> #6
Tested with the latest (e.g. 1.4.0 alpha), and everything works as expected. A single day selection and validation is possible. Also, clicking the start date field after the second one was input works as expected and I don't see a validation error there.
See attached video.
Can you confirm this on the latest library support? Thanks!
ph...@gmail.com <ph...@gmail.com> #7
I looked into the logs and it turns out, the runner didn't have enough disk space. I guess the root cause is the Gradle update causing another Gradle major version (and its new transform-4) folder to cache was too much. Anyway, a better error message of the exit code of GMD would be helpful.
hu...@google.com <hu...@google.com> #8
Thanks for uploading the log! Yes, the emulator kernel log says the issue was the insufficient disk space:
2024-04-02T18:31:45.7078429Z ERROR | Not enough space to create userdata partition. Available: 7177.027344 MB at /home/runner/.config/.android/avd/gradle-managed/dev34_aosp_atd_x86_64_Pixel_2.avd, need 7372.800000 MB.
Also, I agreed that GMD should diagnose errors and can provide better messages.
Let me rename this issue's title to improve the error message for disk space error.
da...@google.com <da...@google.com>
da...@google.com <da...@google.com> #9
I've added a fix that will surface all error messages from the emulator in the exception when it closes unexpectedly.
an...@google.com <an...@google.com> #10
Thank you for your patience while our engineering team worked to resolve this issue. A fix for this issue is now available in:
- Android Studio Meerkat | 2024.3.1 Canary 2
- Android Gradle Plugin 8.9.0-alpha02
We encourage you to try the latest update.
If you notice further issues or have questions, please file a new bug report.
Thank you for taking the time to submit feedback — we really appreciate it!
Description
STEPS TO REPRODUCE:
1. Checkout
2. Run the branch on GitHub using Ubuntu-latest
CMD: ./gradlew :kotlinx-uuid-core:allDevicesCheck -Pandroid.testoptions.manageddevices.emulator.gpu=swiftshader_indirect
Build Scan:
LOG:
------------------
IMPORTANT: Please read
all required information.
------------------
Studio Build:
Version of Gradle Plugin: 8.3.1, 8.4.0-beta01, 8.5.0-alpha01
Version of Gradle: 8.7
Version of Java: 17
OS: Ubuntu 22.04