android-fhir icon indicating copy to clipboard operation
android-fhir copied to clipboard

Date as text input in datePicker view.

Open santosh-pingle opened this issue 1 year ago • 4 comments

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).

santosh-pingle avatar Jul 13 '22 07:07 santosh-pingle

Supporting locale date pattern. Resolving conflicts.

santosh-pingle avatar Jul 18 '22 09:07 santosh-pingle

Code changes as per review comments are in progress.

santosh-pingle avatar Aug 02 '22 12:08 santosh-pingle

https://user-images.githubusercontent.com/86107848/182585687-f636c8e0-25c5-429f-ace2-b556c74ce1f3.mov

santosh-pingle avatar Aug 03 '22 10:08 santosh-pingle

https://user-images.githubusercontent.com/86107848/184305589-3f98d05d-2044-47fe-a60a-4bd9560b155c.mov

santosh-pingle avatar Aug 12 '22 07:08 santosh-pingle

@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

santosh-pingle avatar Aug 16 '22 10:08 santosh-pingle

@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.

santosh-pingle avatar Aug 16 '22 11:08 santosh-pingle

@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.

santosh-pingle avatar Aug 16 '22 12:08 santosh-pingle