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 23338218e7..4ba967f1d8 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/modals/place_booking.js +++ b/koha-tmpl/intranet-tmpl/prog/js/modals/place_booking.js @@ -1018,7 +1018,21 @@ $("#placeBookingModal").on("show.bs.modal", function (e) { elemDate.isAfter(trailStart) && elemDate.isSameOrBefore(trailEnd) ) { - trailDisable = true; + // Only consider this a conflict if the disabled date is within the max date range + // (i.e., disabled due to booking conflict, not because it's beyond max date) + const maxDate = periodPicker.config + .maxDate + ? dayjs( + periodPicker.config + .maxDate + ) + : null; + if ( + !maxDate || + elemDate.isSameOrBefore(maxDate) + ) { + trailDisable = true; + } } } dayElem.classList.remove("leadDisable");