Review main Abandoned

87694[BUGFIX] flatpickr: handle proper validation of altInput

Andreas Kienast CR 0 V 0 Easy +14 −3 updated 01/10/25, 13:29

Commit message

flatpickr builds an alternative input field for user interaction if
enabled (which we do) to separate UI date format from system date
formats.
This adds a new layer of complexity in terms of validation: the event
`formengine.dp.change` was dispatched on the original input field, which
is the one being hidden by flatpickr, causing inproper validation of
date picker fields.

This commit modifies the custom event `formengine.dp.change` to contain
the _actual_ field as payload, which is then handed into the FormEngine
validation. The validity state of the validated input field needs to be
synchronized with the `altInput` generated by flarpickr, therefore a
custom handler for the event `t3-formengine-postfieldvalidation` is
regsitered.

Review

  • Code review CR 0
  • Verified V 0

Files 2

Review log 2

  1. Andreas Kienast uploaded patch set 1 01/10/25, 13:28

  2. Andreas Kienast abandoned the change 01/10/25, 13:29