Summary: | It would be great to have a generic flatpickr based input for datatables column filters | ||
---|---|---|---|
Product: | Koha | Reporter: | Martin Renvoize <martin.renvoize> |
Component: | Templates | Assignee: | Martin Renvoize <martin.renvoize> |
Status: | Patch doesn't apply --- | QA Contact: | Testopia <testopia> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | jonathan.druart, katrin.fischer, lucas, oleonard, tomascohen |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: |
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29422 https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34358 https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30113 |
||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Bug Depends on: | 34226 | ||
Bug Blocks: | |||
Attachments: |
Bug 34352: Enable flatpickr on patron search
Bug 34352: Add allowyear to flatpickr options |
Description
Martin Renvoize
2023-07-24 11:36:01 UTC
Created attachment 153873 [details] [review] Bug 34352: Enable flatpickr on patron search Created attachment 153874 [details] [review] Bug 34352: Add allowyear to flatpickr options An attempt at allowing four digit years to be entered into the flatpickr bound date filter input. However, we're triggering at the wrong stage and I'm not sure where else to look right now :(. The first patch here enables the flatpickr for `type: "date"` columns in our datatables wrapper (this can be tested on the patron search results page, where we already set date types for dateofbirth and expirationdate fields in bug 34226). However, the caveat is this allows only fully formed dates to be input which prevents end users from filtering on year only (or day, or month for that matter). Jonathan raised this as a possible issue and so I tried to update flatpickr to allow 4 digit dates to be entered into the input box.. I failed however, but my attempt is attached in case anyone wants to give it a try. I didn't manage to bypass the flatpickr validation step, which actually happens before onClose. Btw it seems that this validate_date call is not needed. Doesn't apply. I'd be happy to revisit this myself if I can ever get Bug 33703 in. :P |