|
Description
Martin Renvoize (ashimema)
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 |