https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42292
--- Comment #27 from Jan Kissig <[email protected]> --- Created attachment 200912 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200912&action=edit Bug 42292: (follow-up) Replace removed dateformat_pref var in OPAC calendar.inc The OPAC port moved the dateformat pref into Koha.addPrefs and dropped the local `var dateformat_pref = ...;` declaration, but four usages of `dateformat_pref` remain in the same file (the debug alert, two `switch` statements, and the get_dateformat_str call in validate_date). At runtime the switches throw ReferenceError, so flatpickr ends up with the default 'Y-m-d' format and date validation via validate_date crashes before showing the invalid-date alert. Replace all remaining occurrences with Koha.prefs.dateformat, which is populated by the new addPrefs block at the top of the include. To test: - Set dateformat syspref to each of us / metric / dmydot / iso. - Open any OPAC page using a flatpickr input (e.g. hold date, patron dob on the registration form). - Confirm the widget renders dates in the expected format and entering an invalid string triggers the validate_date alert. - No ReferenceError in the browser console on page load. Signed-off-by: Paul Derscheid <[email protected]> Signed-off-by: Jan Kissig <[email protected]> -- 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/
