[Koha-bugs] [Bug 30726] Flatpickr's "yesterday" shortcut doesn't work if entry is limited to past dates

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu May 12 11:50:18 CEST 2022


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30726

Jonathan Druart <jonathan.druart+koha at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jonathan.druart+koha at gmail.
                   |                            |com

--- Comment #1 from Jonathan Druart <jonathan.druart+koha at gmail.com> ---
I think this is the correct fix:

diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc
b/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc
index 1e17eccd573..5b433881377 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc
+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc
@@ -152,7 +152,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 */
             }

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list