From 9042077626c91008555d7d04db838c0b16689677 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). --- 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