[Koha-bugs] [Bug 35341] Circulation rule dates are being overwritten
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Wed Dec 20 16:37:02 CET 2023
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35341
--- Comment #23 from Marcel de Rooy <m.de.rooy at rijksmuseum.nl> ---
As a separate function:
+ function add_clear_button (input) {
+ /* Append a "clear date" link */
+ $(input).find('~input.flatpickr:first')
+ /* Add a wrapper element so that we can prevent the clear button
from wrapping */
+ .wrap("<span class='flatpickr_wrapper'></span>")
+ .attr("autocomplete", "off")
+ .after( $("<a/>")
+ .attr("href","#")
+ .addClass("clear_date")
+ .on("click", function(e){
+ e.preventDefault();
+ $(input).flatpickr().clear();
+ })
+ .addClass("fa fa-fw fa-times")
+ .attr("aria-hidden", true)
+ .attr("aria-label", _("Clear date") )
+ ).keydown(function(e) {
+ var key = (event.keyCode ? event.keyCode : event.which);
+ if ( key == 40 ) {
+ $(input).flatpickr().set('allowInput',false);
+ }
+ });
+ }
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list