android-fhir
android-fhir copied to clipboard
SDC Catalog app: Date validation missing for Date / DateTime picker
Describe the bug Date validation functionality missing for DatePicker and DateTime picker
Component SDC gallery app
To Reproduce Steps to reproduce the behavior:
- Go to Date Picker in SDC catalog app
- Enter any random numbers and no error messages show up
Expected behavior An error message will show up if it doesn't match the date format
Hotlist Needed for usability testing / Oct 7 deadline
#1589
@shelaghm
please refer issue #1589
If item is marked as required : true
in questionnaire.json then it starts showing error message.
If item in questionnaire json does not have require : true
then it does not show error message, its behavior.
In catalog app to check the error message you need to click on gear icon -> show error -> then it start showing error for invalid dates once user start interacting with input field.
I think the format valiation error should NOT be controlled by the "show error state" button in the "options" menu.
so the behavior should be:
in the date input widget -> if the user types a random number, an error message should be shown. but if the user clears the answer, we don't show the answer missing message. in the date input widget with "show errors state" turned on -> if the user types a random number, an error message should be shown. and if the user clears the answer, because the question is "required", we'll show the answer missing message.
what this means is that the "show error state" toggle is not really accurate in this screen.
@shelaghm we probably should come up with different text? Or, I guess in the material catalog app they just put different widgets on the same page with explanations... i don't know which is better.
@jingtang10 @santosh-pingle One suggestion is for the button to say required question
and not show errors
since we will still show validation errors in both scenarios. Thoughts?
I prefer showing both widgets on one page as it is more discoverable than hiding the functionality under the gear icon. In that case, you can ignore my button name suggestion above.
hi @PallaviGanorkar does your pr #1626 fix this?