Skip to content

Date Picker Constraint Not Enforced on 'Ok' Button Click. #2508

Open
@AdityaKBhadragond14

Description

@AdityaKBhadragond14

Describe the bug
In the date picker if there is some constraint which does not allow to select the current date and the user still clicks on "OK" button without selecting any date it still selects the current date as the answer as it is the default to it.

Screen_recording_20240404_153456.webm

Component
SDC Gallery app

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
There can be two approaches to solving this:

  1. Disable the "OK" button if the date selected is invalid enable only when the selected date is valid.
  2. Set the default date to the minimum valid date. This way we can reduce the number of clicks the user has to do in order to select a valid date.

Screenshots
If applicable, add screenshots to help explain your problem.

Smartphone (please complete the following information):

  • Device: [e.g. Pixel4a emulator]
  • Android version: [e.g. Settings -> About phone -> Android version]
  • Build number: [e.g. Settings -> About phone -> Build number]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Would you like to work on the issue?
Yes.

Metadata

Metadata

Labels

P2Medium priority issueeffort:smallSmall effort - 2 daysux

Type

No type

Projects

Status

New

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions