Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fixes #203] Resolve Patient DOB Bug #205

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open

[Fixes #203] Resolve Patient DOB Bug #205

wants to merge 2 commits into from

Conversation

samau3
Copy link
Contributor

@samau3 samau3 commented Feb 21, 2025

Fixes #203.

As described in the issue, the date of birth field was not persisting values correctly when navigating between sections. This was happening because:

  1. The date input is now using a TextInput, whereas before it was using a DateInput
  • When DateInput was being used, the DOB value from the server was converted into a date object to be compatible with the format expected with this input field (i.e. new Date(dateOfBirth)) but this is no longer necessary
  1. This meant that the date format handling wasn't consistent between server data and input requirements due to the change in input type formats

Therefore, to resolve this issue the DOB value when populating the form with the DOB data from the server has to be kept as a string rather than converting it into a date object.

Some additional key changes:

  • Removed the props that were necessary for DateInput but are no longer valid for TextInput to resolve console warnings
  • Set the max date to be in the format en-CA to match the format that HTML date input expects. However iOS Safari doesn't support the max attribute as seen from many online discussions like this one
ScreenRecording_02-20-2025.22-02-18_1.MP4

@samau3 samau3 marked this pull request as ready for review February 21, 2025 06:14
@samau3 samau3 requested a review from francisli February 21, 2025 06:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

User seeing "patient registration failed" on new patient creation
1 participant