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

fix bug in old datefield, add leading zeros to new date field mm and dd #8880

Merged
merged 3 commits into from
Mar 7, 2025

Conversation

cibelius
Copy link
Contributor

@cibelius cibelius commented Mar 7, 2025

Add leading zeroes to month and date field if missing. Also fix bug on V1 and V2 input fields, see comment below.

Screen.Recording.2025-03-07.at.11.35.33.mov

@cibelius cibelius added the 🚀 Ready to deploy Deployment automation should pick this PR up and start auto-deploying it label Mar 7, 2025
Copy link

github-actions bot commented Mar 7, 2025

Oops! Looks like you forgot to update the changelog. When updating CHANGELOG.md, please consider the following:

  • Changelog is read by country implementors who might not always be familiar with all technical details of OpenCRVS. Keep language high-level, user friendly and avoid technical references to internals.
  • Answer "What's new?", "Why was the change made?" and "Why should I care?" for each change.
  • If it's a breaking change, include a migration guide answering "What do I need to do to upgrade?".

@@ -107,9 +107,6 @@ export const DateField = ({
const updatedValue = { ...date, [segmentType]: val }
setDate(updatedValue)

if (yyyy === '' && mm === '' && dd === '') {
Copy link
Contributor Author

@cibelius cibelius Mar 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was causing a bug on both V1 and V2: when the user e.g. selects 'day' field, then presses backspace, and tries to enter a character, it will not register the first inputted character, only the second one.

@cibelius cibelius linked an issue Mar 7, 2025 that may be closed by this pull request
1 task
@cibelius cibelius marked this pull request as ready for review March 7, 2025 09:37
@cibelius cibelius deployed to ocrvs-8830-b March 7, 2025 09:49 — with GitHub Actions Active
@ocrvs-bot
Copy link
Collaborator

Your environment is deployed to https://ocrvs-8830-b.opencrvs.dev

@cibelius cibelius removed the 🚀 Ready to deploy Deployment automation should pick this PR up and start auto-deploying it label Mar 7, 2025
@cibelius
Copy link
Contributor Author

cibelius commented Mar 7, 2025

E2e tests passed on rerun here: https://github.com/opencrvs/e2e/actions/runs/13718077049/job/38368403993

@cibelius cibelius enabled auto-merge (squash) March 7, 2025 10:29
@cibelius cibelius disabled auto-merge March 7, 2025 10:29
@cibelius cibelius merged commit 2046a40 into develop Mar 7, 2025
75 of 76 checks passed
@cibelius cibelius deleted the ocrvs-8830-b branch March 7, 2025 10:30
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.

Date fields show error when 0 prefix is missing
3 participants