Date of birth input should use input view not calendar view
See original GitHub issueAvoid duplicates
- Bug is not mentioned in the FAQ
- Bug is specific for Android only, for general issues / questions that apply to iOS and Android please raise them in the documentation repository
- Bug is not already reported in another issue
Technical details
- Device name: Google Pixel 3a emulator
- Android version: 11
- App version:
2.7.12.9.0
Describe the bug
The date picker for date of birth in the Rapid Test Profile and in COVID Test Certificate opens by default in calendar view. The recommended view for dates not near to the current date, like dates of birth, is input view.
The title of the date picker is not set. The default “SELECT DATE” is shown.
Steps to reproduce the issue
- Set locale to English (United Kingdom)
- Tap “Manage Your Tests”
- Tap “Create Rapid Test Profile” (tap “CONTINUE” if prompted)
- Tap “Date of Birth”
- Note that the date picker appears in calendar view, with title “SELECT DATE” and today’s date selected
- Tap “CANCEL”, tap back arrow
- Tap “Scan QR Code”, tap “ACCEPT”
- Scan QR Code e.g. PCR Test QR Code
- Tap “Date of Birth”
- Note that the date picker appears in calendar view, with title “SELECT DATE”
Expected behavior
Follow the advice from https://material.io/components/date-pickers#mobile-pickers and use the mobile date input picker, not the calendar view.
Add the title “Date of Birth” to the data picker, so the user is reminded what data they are being asked to enter.
Possible Fix
add
.setInputMode(MaterialDatePicker.INPUT_MODE_TEXT)
.setTitleText(getResources().getString(R.string.rat_profile_create_birth_date_hint))
add
.setInputMode(MaterialDatePicker.INPUT_MODE_TEXT)
.setTitleText(getResources().getString(R.string.request_green_certificate_birthdate_hint))
Workaround
Select input view from calendar view by tapping the pencil icon.
Additional context
https://material.io/components/date-pickers#mobile-pickers says
Don’t
Don’t use a calendar picker to prompt for dates in the distant past or future, such as a date of birth. In these cases, use a mobile input picker or a text field instead.
Do
For dates that don’t require a calendar view, make the mobile date input picker as the default prompt.
Internal Tracking ID: EXPOSUREAPP-9128
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:10 (10 by maintainers)
Top GitHub Comments
@dsarkar
Thank you and the UX team for considering! Stand by for a PR from me once the work on PR https://github.com/corona-warn-app/cwa-app-android/pull/3987 has stabilized.
@dsarkar Yes, I did already try it out and I can provide a PR if dev would like this submission.
It is an enhancement, not a bug correction. It is just more inconvenient to enter a date of birth from the calendar view.
Let me know if the PR is wanted. If they say no, then that is OK with me.