From 987639d5ab41345b5adfbbe11c54f12b58ac11c1 Mon Sep 17 00:00:00 2001 From: Jacob O'Mara Date: Thu, 19 Feb 2026 11:45:00 +0000 Subject: [PATCH] Bug 38924: (follow-up) Fix edit modal not autofilling end date The flatpickr setDate calls were passing triggerChange=1 which caused the start picker's hooks to interfere with the end picker before its value could be set. Remove triggerChange to match the pattern used by other Koha date pickers (members.js, datatables.js). Signed-off-by: Jacob O'Mara --- koha-tmpl/intranet-tmpl/prog/js/modals/quota.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/js/modals/quota.js b/koha-tmpl/intranet-tmpl/prog/js/modals/quota.js index 70fbda32d1e..ff3c374730a 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/modals/quota.js +++ b/koha-tmpl/intranet-tmpl/prog/js/modals/quota.js @@ -120,11 +120,8 @@ quotaModalSubmit.innerHTML = ' ' + __("Update"); quotaDescriptionInput.value = button.dataset.description; - quotaStartDateInput._flatpickr.setDate( - button.dataset.start_date, - 1 - ); - quotaEndDateInput._flatpickr.setDate(button.dataset.end_date, 1); + quotaStartDateInput._flatpickr.setDate(button.dataset.start_date); + quotaEndDateInput._flatpickr.setDate(button.dataset.end_date); quotaAllocationInput.value = button.dataset.allocation; } else { quotaIdInput.value = null; -- 2.39.5