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@myacpl.org Reporter: martin.renvoize@ptfs-europe.com QA Contact: testopia@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.