[Bug 38081] New: maskitoTimeOptionsGenerator does not properly support 12-hour times in calendar.inc
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38081 Bug ID: 38081 Summary: maskitoTimeOptionsGenerator does not properly support 12-hour times in calendar.inc Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: trivial Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: cj.lynce@westlakelibrary.org QA Contact: testopia@bugs.koha-community.org Whenediting a library's information via Administration->Libraries->Edit, a 'TypeError' is being thrown to the console. I've traced it back to the maskito mask that is applied via Flatpickr. The root cause seems to be that maskito does not properly support 12-hour time formats for time-only masks via the maskitoTimeOptionsGenerator function. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38081 CJ Lynce <cj.lynce@westlakelibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |cj.lynce@westlakelibrary.or |ity.org |g Severity|trivial |minor Status|NEW |ASSIGNED Depends on| |36594 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36594 [Bug 36594] Library hours display issues -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38081 --- Comment #1 from CJ Lynce <cj.lynce@westlakelibrary.org> --- Created attachment 172366 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=172366&action=edit Bug 38081: maskitoTimeOptionsGenerator does not properly support 12-hour times in calendar.inc This patch corrects an issue where flatpickr time-only input boxes boxes were not having their inputs masked (limited) properly due to maskitoTimeOptionsGenerator not properly supporting 12-hour time inputs for time-only input boxes. To test: 1. Login to the staff intranet. 2. Open Administration->Libraries-> Edit any library. 3. Open your browser's development console (typically via F12) Verify a 'TypeError' message has been thrown for this page. 4. Type in any text into any of the opening hours This should be limiting only to properly formatted HH:MM. 5. Apply patch 6. Repeat steps 2-4 Verify no errors show on your browser's development console. Verify opening hours entry are limited to proper HH:MM format. 7. Open Administration->System Preferences and change TimeFormat to 12-hours, Save. 8. Repeat steps 2-4 Verify opening hours text entry are limited to properly formatted HH:MM AM/PM (or am/pm) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38081 CJ Lynce <cj.lynce@westlakelibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff --- Comment #2 from CJ Lynce <cj.lynce@westlakelibrary.org> --- It appears that support for 12-hour formats is in the works for maskitoTimeOptions Generator: https://github.com/taiga-family/maskito/issues/1169 This should be revisited once that support has been added. (A manual mask is being used in the mean-time) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38081 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38081 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #172366|0 |1 is obsolete| | --- Comment #3 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 172449 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=172449&action=edit Bug 38081: maskitoTimeOptionsGenerator does not properly support 12-hour times in calendar.inc This patch corrects an issue where flatpickr time-only input boxes boxes were not having their inputs masked (limited) properly due to maskitoTimeOptionsGenerator not properly supporting 12-hour time inputs for time-only input boxes. To test: 1. Login to the staff intranet. 2. Open Administration->Libraries-> Edit any library. 3. Open your browser's development console (typically via F12) Verify a 'TypeError' message has been thrown for this page. 4. Type in any text into any of the opening hours This should be limiting only to properly formatted HH:MM. 5. Apply patch 6. Repeat steps 2-4 Verify no errors show on your browser's development console. Verify opening hours entry are limited to proper HH:MM format. 7. Open Administration->System Preferences and change TimeFormat to 12-hours, Save. 8. Repeat steps 2-4 Verify opening hours text entry are limited to properly formatted HH:MM AM/PM (or am/pm) Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38081 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com QA Contact|testopia@bugs.koha-communit |lucas@bywatersolutions.com |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38081 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38081 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #172449|0 |1 is obsolete| | --- Comment #4 from Lucas Gass <lucas@bywatersolutions.com> --- Created attachment 172495 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=172495&action=edit Bug 38081: maskitoTimeOptionsGenerator does not properly support 12-hour times in calendar.inc This patch corrects an issue where flatpickr time-only input boxes boxes were not having their inputs masked (limited) properly due to maskitoTimeOptionsGenerator not properly supporting 12-hour time inputs for time-only input boxes. To test: 1. Login to the staff intranet. 2. Open Administration->Libraries-> Edit any library. 3. Open your browser's development console (typically via F12) Verify a 'TypeError' message has been thrown for this page. 4. Type in any text into any of the opening hours This should be limiting only to properly formatted HH:MM. 5. Apply patch 6. Repeat steps 2-4 Verify no errors show on your browser's development console. Verify opening hours entry are limited to proper HH:MM format. 7. Open Administration->System Preferences and change TimeFormat to 12-hours, Save. 8. Repeat steps 2-4 Verify opening hours text entry are limited to properly formatted HH:MM AM/PM (or am/pm) Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38081 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch --- Comment #5 from Lucas Gass <lucas@bywatersolutions.com> --- Thanks CJ, changes look good. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38081 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |24.11.00 released in| | Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38081 --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 24.11! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38081 Bug 38081 depends on bug 36594, which changed state. Bug 36594 Summary: Library hours display issues https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36594 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38081 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |RESOLVED Resolution|--- |FIXED --- Comment #7 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Doesn't cleanly apply to 24.05.x, rebase if needed. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org