https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33886
--- Comment #12 from Martin Renvoize (ashimema) <[email protected]> --- Date of birth and expiry date fields on the patron form now render as three separate numeric text inputs (Day, Month, Year) ordered and separated according to the dateformat preference, plus a calendar button and clear button. All other date fields retain the standard flatpickr widget. Fields affected: dateofbirth (staff + OPAC), dateexpiry (staff only). Setup Apply patches, run yarn css:build inside KTD. Have an existing patron with a DOB set. Enable OPAC self-registration. Staff patron form Widget appearance - Date of birth and expiry date show three text inputs (Day/Month/Year) with labels, separators, a calendar icon button, and a clear (×) button - Registration date, password expiration date, and restriction expiry retain the standard flatpickr — confirm no split widget appears on these Part ordering by dateformat ┌────────────┬────────────────────┬───────────┐ │ dateformat │ Order │ Separator │ ├────────────┼────────────────────┼───────────┤ │ metric │ Day / Month / Year │ / │ ├────────────┼────────────────────┼───────────┤ │ us │ Month / Day / Year │ / │ ├────────────┼────────────────────┼───────────┤ │ dmydot │ Day / Month / Year │ . │ ├────────────┼────────────────────┼───────────┤ │ iso / sql │ Year / Month / Day │ - │ └────────────┴────────────────────┴───────────┘ Typing behaviour - Entering 2 digits in Day or Month auto-advances focus to the next input; Backspace does not auto-advance - Completing all three parts updates the hidden ISO input (YYYY-MM-DD) - Clearing any part clears the hidden input Calendar button - Opens the flatpickr picker; selecting a date populates all three split inputs and the hidden ISO input Clear button - Empties all three split inputs and the hidden ISO input Edit mode — existing patron's DOB and expiry pre-populate correctly in the split inputs Duplicate mode — DOB and expiry split inputs are empty (not copied) Validation - Required DOB with all inputs empty → alert, focus on first split input - Any partial entry (some parts filled, not all) → alert about incomplete date - Invalid calendar date (e.g. 31/02/2024) → alert about invalid date - Valid complete date → form submits, correct date stored OPAC self-registration - Split widget renders for date of birth with correct ordering/separator - Typing, calendar, and clear behave the same as staff - Partial or invalid entry blocks form submission; valid entry saves correctly Accessibility - Each split input has a <label> with a matching for attribute - Separators have aria-hidden="true"; calendar and clear buttons have aria-label - autocomplete attributes set: bday-day, bday-month, bday-year - Tab order flows naturally through the three inputs and buttons Regression Verify standard flatpickr fields elsewhere (acquisitions dates, circulation due dates, report date ranges, datetime fields) are unaffected. -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
