From 048d349ddc76665234aeeeecd7c11a46f5683089 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: Sally --- 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 70fbda32d1..ff3c374730 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