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

FIO-8375: allow date time to have manual input #5739

Merged
merged 3 commits into from
Sep 9, 2024

Conversation

ZenMasterJacob20011
Copy link
Contributor

Link to Jira Ticket

https://formio.atlassian.net/browse/FIO-8375

Description

What changed?

Previously when manual input was given to the date/time component the input mask would fill to create a complete time on blur. Now when the input triggers a blur event the manual input will not fill the input mask but instead be left incomplete. I have also made changes so that the validation will trigger as you are typing a manual input.

Why have you chosen this solution?

This solution allows you to use both the flatpickr and manual input without needing to switch one or the other off

Breaking Changes / Backwards Compatibility

This PR should be tested extensively for correct validation, and correct submission data when submitted. To allow for date time input mask to remain incomplete upon clicking outside of the input required a lot of fighting with the Flatpickrs event listeners.

Dependencies

N/A

How has this PR been tested?

Manually tested and automated test

Checklist:

  • I have completed the above PR template
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (if applicable)
  • My changes generate no new warnings
  • My changes include tests that prove my fix is effective (or that my feature works as intended)
  • New and existing unit/integration tests pass locally with my changes
  • Any dependent changes have corresponding PRs that are listed above

@formio formio deleted a comment from TanyaGashtold Aug 30, 2024
@formio formio deleted a comment from TanyaGashtold Aug 30, 2024
@ZenMasterJacob20011
Copy link
Contributor Author

@TanyaGashtold I didn't realize deleting the comments in my ide would also delete the comments in github as well. I have removed the setTimeouts as requested. I also added some inputEvents for the tests because they would not pass without them. I believe that it is necessary to trigger these input events because manual values require input events to occur for them to work properly

@TanyaGashtold TanyaGashtold merged commit 075c8b8 into master Sep 9, 2024
5 checks passed
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.

2 participants