From 8309ba4c635f08e9400a7c019a7b773299f098fd Mon Sep 17 00:00:00 2001 From: Angel Fernando Quiroz Campos Date: Thu, 10 Nov 2022 18:30:38 -0500 Subject: [PATCH] Announcements: Fix dates for sortable table - refs BT#20325 --- main/admin/system_announcements.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/main/admin/system_announcements.php b/main/admin/system_announcements.php index 233fb34b18..cfb86dc284 100755 --- a/main/admin/system_announcements.php +++ b/main/admin/system_announcements.php @@ -362,8 +362,8 @@ if ($show_announcement_list) { $row[] = $announcement->id; $row[] = Display::return_icon(($announcement->visible ? 'accept.png' : 'exclamation.png'), ($announcement->visible ? get_lang('AnnouncementAvailable') : get_lang('AnnouncementNotAvailable'))); $row[] = $announcement->title; - $row[] = api_convert_and_format_date($announcement->date_start); - $row[] = api_convert_and_format_date($announcement->date_end); + $row[] = $announcement->date_start; + $row[] = $announcement->date_end; $data = (array) $announcement; foreach ($visibleList as $key => $value) { @@ -385,6 +385,12 @@ if ($show_announcement_list) { $table->set_header(1, get_lang('Active')); $table->set_header(2, get_lang('Title')); $table->set_header(3, get_lang('StartTimeWindow')); + $table->set_column_filter(3, function ($data) { + return api_convert_and_format_date($data); + }); + $table->set_column_filter(4, function ($data) { + return api_convert_and_format_date($data); + }); $table->set_header(4, get_lang('EndTimeWindow')); $count = 5;