android-fhir
android-fhir copied to clipboard
Date as text input in datePicker view.
IMPORTANT: All PRs must be linked to an issue (except for extremely trivial and straightforward changes).
Fixes #1418
Description
- Enable textInputTextField to accept date as input.
- Support locale date pattern.
Alternative(s) considered Have you considered any alternatives? And if so, why have you chosen the approach in this PR?
Type Choose one: Feature
Screenshots (if applicable)
https://user-images.githubusercontent.com/86107848/179512410-91690e01-04b9-448a-9e70-baa09dd16d9d.mov
Checklist
- [x] I have read and acknowledged the Code of conduct.
- [x] I have read the Contributing page.
- [x] I have signed the Google Individual CLA, or I am covered by my company's Corporate CLA.
- [x] I have discussed my proposed solution with code owners in the linked issue(s) and we have agreed upon the general approach.
- [x] I have run
./gradlew spotlessApply
and./gradlew spotlessCheck
to check my code follows the style guide of this project. - [x] I have run
./gradlew check
and./gradlew connectedCheck
to test my changes locally. - [x] I have built and run the demo app(s) to verify my change fixes the issue and/or does not break the demo app(s).
Supporting locale date pattern. Resolving conflicts.
Code changes as per review comments are in progress.
https://user-images.githubusercontent.com/86107848/182585687-f636c8e0-25c5-429f-ace2-b556c74ce1f3.mov
https://user-images.githubusercontent.com/86107848/184305589-3f98d05d-2044-47fe-a60a-4bd9560b155c.mov
@jingtang10 checking below crash, if i enter date with 5 digit year e.g 21/12/19843 then it throws fhir data format exception in QuestionnaireItemViewItem. Same date is parsed as valid date by android icu.
ca.uhn.fhir.parser.DataFormatException: Invalid date/time format: "19843-12-21": Expected character '-' at index 4 but found 3
@jingtang10 checking below crash, if i enter date with 5 digit year e.g 21/12/19843 then it throws fhir data format exception in QuestionnaireItemViewItem. Same date is parsed as valid date by android icu.
ca.uhn.fhir.parser.DataFormatException: Invalid date/time format: "19843-12-21": Expected character '-' at index 4 but found 3
Crash happens in fhir library when it performs deep copy operation on [QuestionnaireResponse.QuestionnaireResponseItemComponent] which has above mentioned date.
@jingtang10 checking below crash, if i enter date with 5 digit year e.g 21/12/19843 then it throws fhir data format exception in QuestionnaireItemViewItem. Same date is parsed as valid date by android icu. ca.uhn.fhir.parser.DataFormatException: Invalid date/time format: "19843-12-21": Expected character '-' at index 4 but found 3
Crash happens in fhir library when it performs deep copy operation on [QuestionnaireResponse.QuestionnaireResponseItemComponent] which has above mentioned date.
it also happens in QuestionnaireResponse deep copy operation.