[Bug 29241] New: Flatpickr not displaying date in the past for futuredate
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29241 Bug ID: 29241 Summary: Flatpickr not displaying date in the past for futuredate Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Staff Client Assignee: koha-bugs@lists.koha-community.org Reporter: jonathan.druart+koha@gmail.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com Blocks: 29239 For instance if a hold is expired (expirationdate in the past), the date input will be blanked. To recreate: Place a hold Edit its expirationdate and set a date in the past (yesterday is fine) Go to /reserve/request.pl?biblionumbers=42 Notice that the expirationdate is not displayed Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29239 [Bug 29239] [OMNIBUS] Replace jQueryUI's timepicker with flatpickr -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29241 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |29240 --- Comment #1 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Things to try (but bug 29240 needs to be fixed first): * Use "enable" with expirationdate AND minDate # would be weird but worst to test * Use "enable" with "expirationdate", {from: today_date} # Does it work without to? https://flatpickr.js.org/examples/#supplying-dates-for-flatpickr Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29240 [Bug 29240] Flatpickr - error in the console when a date is selected -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29241 Andrew Nugged <nugged@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nugged@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29241 --- Comment #2 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- https://flatpickr.js.org/options/ allowInvalidPreload Boolean false Allows the preloading of an invalid date. When disabled, the field will be cleared if the provided date is invalid -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29241 --- Comment #3 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- (In reply to Jonathan Druart from comment #2)
https://flatpickr.js.org/options/
allowInvalidPreload Boolean false Allows the preloading of an invalid date. When disabled, the field will be cleared if the provided date is invalid
It did not work when I was setting in from onReady, but it works when it's passed to the constructor. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29241 --- Comment #4 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 126260 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126260&action=edit Bug 29241: Use allowInvalidPreload to allow date in the past -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29241 --- Comment #5 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- This patch is the way to go. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29241 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #126260|0 |1 is obsolete| | --- Comment #6 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 126268 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126268&action=edit Bug 29241: Use allowInvalidPreload to allow date in the past -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29241 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_21_11_candidate -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29241 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29241 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #126268|0 |1 is obsolete| | --- Comment #7 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 126473 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126473&action=edit Bug 29241: Allow display of past date for .futuredate When a past date is set for a flatpickr instance with the .futuredate class, only dates in the future are available AND the input is blanked. It does not display the date in the past. For instance if a hold is expired (expirationdate in the past), the date input will be blanked. We can use the flatpickr's allowInvalidPreload option to allow date in the past to be displayed. Test plan: Place a hold Edit its expirationdate and set a date in the past (yesterday is fine) Go to /reserve/request.pl?biblionumbers=42 => With the patch you see the date, and the widget let you chose anoter date, in the future => Without this patch the expiration date is not displayed -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29241 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |jonathan.druart+koha@gmail. |ity.org |com -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29241 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |29270 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29270 [Bug 29270] Use flatpickr and futuredate on reserve/request.tt -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29241 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |29229 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29229 [Bug 29229] Use Flatpickr in suggestion search sidebar filter -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29241 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29241 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #126473|0 |1 is obsolete| | --- Comment #8 from David Nind <david@davidnind.com> --- Created attachment 126674 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126674&action=edit Bug 29241: Allow display of past date for .futuredate When a past date is set for a flatpickr instance with the .futuredate class, only dates in the future are available AND the input is blanked. It does not display the date in the past. For instance if a hold is expired (expirationdate in the past), the date input will be blanked. We can use the flatpickr's allowInvalidPreload option to allow date in the past to be displayed. Test plan: Place a hold Edit its expirationdate and set a date in the past (yesterday is fine) Go to /reserve/request.pl?biblionumbers=42 => With the patch you see the date, and the widget let you chose anoter date, in the future => Without this patch the expiration date is not displayed Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29241 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com --- Comment #9 from David Nind <david@davidnind.com> --- Testing notes (koha-testing-docker): - date picker doesn't let you go back past the current date - entering date manually works (and is retained) after patch is applied -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29241 Bug 29241 depends on bug 29240, which changed state. Bug 29240 Summary: Flatpickr - error in the console when a date is selected https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29240 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29241 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29241 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #126674|0 |1 is obsolete| | --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 126795 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126795&action=edit Bug 29241: Allow display of past date for .futuredate When a past date is set for a flatpickr instance with the .futuredate class, only dates in the future are available AND the input is blanked. It does not display the date in the past. For instance if a hold is expired (expirationdate in the past), the date input will be blanked. We can use the flatpickr's allowInvalidPreload option to allow date in the past to be displayed. Test plan: Place a hold Edit its expirationdate and set a date in the past (yesterday is fine) Go to /reserve/request.pl?biblionumbers=42 => With the patch you see the date, and the widget let you chose anoter date, in the future => Without this patch the expiration date is not displayed Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29241 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |21.11.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29241 --- Comment #11 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Pushed to master for 21.11, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29241 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|rel_21_11_candidate | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29241 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |RESOLVED Resolution|--- |FIXED CC| |kyle@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29241 --- Comment #12 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Unfortunately there is a problem with this patch. The futuredate class add both minDate and allowInvalidPreload. It fix the original problem describes here, but it also permits the user to enter invalid (in the past) dates. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29241 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |29500 --- Comment #13 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- (In reply to Jonathan Druart from comment #12)
Unfortunately there is a problem with this patch. The futuredate class add both minDate and allowInvalidPreload. It fix the original problem describes here, but it also permits the user to enter invalid (in the past) dates.
See bug 29500. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29500 [Bug 29500] Flatpickr accepting original date in the past for futuredate but also other dates in the past -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org