From 3ce7357dc8a03da9d0a3e92b9e8b8dbbfa25fc0f 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 (cherry picked from commit 637c580663f2abc5005ed2c96ef324e28c4feb20) Signed-off-by: Lucas Gass (cherry picked from commit 4369c228b8291b7e9861b7bdb2ec25564866c7dc) Signed-off-by: Arthur Suzuki --- 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 38e16b8a09..715cb39815 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc @@ -153,7 +153,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