formio.js icon indicating copy to clipboard operation
formio.js copied to clipboard

FIO-8375: allow date time to have manual input

Open ZenMasterJacob20011 opened this issue 6 months ago • 0 comments

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:

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

ZenMasterJacob20011 avatar Aug 11 '24 23:08 ZenMasterJacob20011