Bug 34226: DT wrapper - pre-processed date term when filtering
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 7 Jul 2023 13:11:44 +0000 (15:11 +0200)
committerTomas Cohen Arazi <tomascohen@theke.io>
Tue, 25 Jul 2023 19:25:35 +0000 (16:25 -0300)
commit4e3b209a0d6b6adecfd5ce3107f416bd581b8aaf
tree06e7de424bb957072651a8b4f7ddc3eb12c87edc
parent9c3fa90aec58dbc50a7577489a20d1b74556f790
Bug 34226: DT wrapper - pre-processed date term when filtering

If we have filters on top of column on a table that is using the DT REST API wrapper,
we cannot filter on date using formatted dates.

This was done for "date of birth" for bug 32505.
Here we want to provide a generic approach.

Note that we cannot use what has been done on bug 22440 in some cases
(when we don't write the thead DOM directly but rely on DataTables
constructor, for instance bug 33568). The data- attributes are not
passed by DT.

Test plan:
On top of 33568, filter date columns using the full version of the
formatted date

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
koha-tmpl/intranet-tmpl/prog/js/datatables.js