In bug 34226 I attempted to add flatpickr inputs for the column filtering in ajax driven datatables. It worked well in the case I experimented on, but wasn't quite enough for the more generic handling I was aiming for. We need to support flatpickr without having to import calender.inc in a rather specific load order and we could do with still being able to search on year only rather than always having to specify a full date.
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