From 0761107a5f02c60413a0950913bfb8bfb6f75ebe Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 17 Jul 2023 10:35:22 +0200 Subject: [PATCH] Bug 34292: (bug 33804 follow-up) Format "checked out on" date Test plan: 1) Without applying this patch, issue an item to a patron and notice that in the 'Checkouts' table the 'Checked out on' date is of the form YYYY-MM-DD HH:MM:SS. 2) Apply this patch, restart Plack if necessary. 3) Refresh the patron 'Checkouts' table: this time the 'Checked out on' date will observe the setting of your `dateformat` System Preference. 4) Extra credit: repeat step 3) for different `dateformat` settings, each time you should get a 'Checked out on' date that matches the date format you chose. Signed-off-by: Andreas Roussos Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- koha-tmpl/intranet-tmpl/prog/js/checkouts.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js index 4920eccb9d..9836a960d0 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js +++ b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js @@ -426,7 +426,9 @@ $(document).ready(function() { }, { "iDataSort": 10, // Sort on hidden unformatted issuedate column - "mDataProp": "issuedate", + "mDataProp": function( oObj ) { + return $datetime(oObj.issuedate, { no_tz_adjust: true }); + } }, { "mDataProp": function ( oObj ) { @@ -823,7 +825,9 @@ $(document).ready(function() { }, { "iDataSort": 7, // Sort on hidden unformatted issuedate column - "mDataProp": "issuedate", + "mDataProp": function ( oObj ) { + return $datetime(oObj.issuedate, { no_tz_adjust: true }); + } }, { "mDataProp": function ( oObj ) { -- 2.20.1