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 <lucas@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 637c580663)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 4369c228b8)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
This commit is contained in:
Jonathan Druart 2022-06-01 14:36:52 +02:00 committed by Arthur Suzuki
parent 2d2cff6fc6
commit 3ce7357dc8
1 changed files with 1 additions and 1 deletions

View File

@ -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 */
}