From f0d04bc56546b6e9a9fd86295adf4b10747300c2 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Fri, 8 Nov 2024 15:26:20 +0000 Subject: [PATCH] Bug 37354: (QA follow-up) Reset state on clear We were missing a reset for flatPickr state when using the clear option for flatPickr. Signed-off-by: Martin Renvoize --- koha-tmpl/intranet-tmpl/prog/js/modals/place_booking.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/js/modals/place_booking.js b/koha-tmpl/intranet-tmpl/prog/js/modals/place_booking.js index 8d5e0943744..7b85ac53dac 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/modals/place_booking.js +++ b/koha-tmpl/intranet-tmpl/prog/js/modals/place_booking.js @@ -815,8 +815,10 @@ $("#placeBookingModal").on("show.bs.modal", function (e) { }); $("#booking_item_id").trigger("change.select2"); } - // Range not set, reset field options + // Range not set, reset field options and flatPickr state else { + boldDates = []; + instance.set("maxDate", null); $("#booking_item_id > option").each(function () { let option = $(this); if (option.data("pickup")) { -- 2.47.0