From 637c580663f2abc5005ed2c96ef324e28c4feb20 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 1 Jun 2022 14:36:52 +0200 Subject: [PATCH] Bug 30726: Fix "yesterday" when limited to past dates Test plan: Go to "Patrons with no checkouts" report, /cgi-bin/koha/reports/borrowers_out.pl Select "Yesterday" => it automatically selects the previous day's date and populates the form field Signed-off-by: Lucas Gass Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc index 47a3f76ec2..2432225d21 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc @@ -148,7 +148,7 @@ disable_buttons.push(2); /* Tomorrow */ } if( $(this).data("flatpickr-pastdate") === true ) { - options['maxDate'] = new Date().fp_incr(-1); + options['maxDate'] = new Date().fp_incr(-1).setHours(23, 59, 00, 00); disable_buttons.push(1); /* Today */ disable_buttons.push(2); /* Tomorrow */ } -- 2.39.5