From 1000ab402b86ea9cafefbea698e9b05f62105353 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 23 May 2023 12:16:55 +0200 Subject: [PATCH] Bug 33804: Use as_due_date to display due dates Signed-off-by: Martin Renvoize Signed-off-by: Nick Clemens Signed-off-by: Tomas Cohen Arazi --- .../prog/en/includes/js-date-format.inc | 5 +++-- .../prog/en/modules/circ/circulation.tt | 1 + koha-tmpl/intranet-tmpl/prog/js/checkouts.js | 17 +++++++++-------- svc/checkouts | 12 ------------ 4 files changed, 13 insertions(+), 22 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/js-date-format.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/js-date-format.inc index 640fa5c90c..06fdcb67f1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/js-date-format.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/js-date-format.inc @@ -42,9 +42,10 @@ */ window.$date = function(value, options) { if(!value) return ''; - var tz = (options&&options.tz)||def_tz; + let tz = (options&&options.tz)||def_tz; + let no_tz_adjust = (options&&options.no_tz_adjust)||false; var m = dayjs(value); - if ( ! value.match(/^\d{4}-\d{2}-\d{2}$/ ) ) { + if ( !no_tz_adjust && ! value.match(/^\d{4}-\d{2}-\d{2}$/ ) ) { m = m.tz(tz); } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt index e2fec123ee..4150426c37 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -870,6 +870,7 @@ [% Asset.js("lib/jquery/plugins/rowGroup/dataTables.rowGroup.min.js") | $raw %] [% PROCESS 'modal-claims.inc' %] [% PROCESS 'modal-claims-js' %] + [% INCLUDE 'js-date-format.inc' %]