[Koha-bugs] [Bug 29450] New: Allow flatPickr to instantiate in any order

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Nov 10 11:49:22 CET 2021


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29450

            Bug ID: 29450
           Summary: Allow flatPickr to instantiate in any order
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P5 - low
         Component: Templates
          Assignee: oleonard at myacpl.org
          Reporter: martin.renvoize at ptfs-europe.com
        QA Contact: testopia at bugs.koha-community.org

Currently, we automatically instantiate a flatPickr instance for any input
fields that have the flatpickr class.

This instantiation is handling within a loop and works well in most cases. 
However, if the the input is paired so we have a start/end date pair and the
start date is pre-populated with the template you are faced with javascript
errors.

This is because the pre-populated value triggers our onClose function that
resides in the instantiation settings. The onClose looks for the associated
'end' input and grabs the flatpickr instance to set the minDate property.. but
as we've not yet hit the end input field the flatpicker instance for that field
doesn't yet exist.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list