From 721b99bb2f3b8ba8e814ee6a1bd910988bd94e01 Mon Sep 17 00:00:00 2001 From: Supermanu Date: Wed, 13 May 2020 13:56:39 +0200 Subject: [PATCH] Add calendar selection for agenda view --- htdocs/comm/action/index.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index e0ded511928..5ef377adb33 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -90,6 +90,15 @@ $status = GETPOST("search_status", 'aZ09') ?GETPOST("search_status", 'aZ09') : G $type = GETPOST("search_type", 'aZ09') ?GETPOST("search_type", 'aZ09') : GETPOST("type", 'aZ09'); $maxprint = (isset($_GET["maxprint"]) ?GETPOST("maxprint") : $conf->global->AGENDA_MAX_EVENTS_DAY_VIEW); $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') + +$dateselect=dol_mktime(0, 0, 0, GETPOST('dateselectmonth', 'int'), GETPOST('dateselectday', 'int'), GETPOST('dateselectyear', 'int')); +if ($dateselect > 0) +{ + $day=GETPOST('dateselectday', 'int'); + $month=GETPOST('dateselectmonth', 'int'); + $year=GETPOST('dateselectyear', 'int'); +} + // Set actioncode (this code must be same for setting actioncode into peruser, listacton and index) if (GETPOST('search_actioncode', 'array')) { @@ -371,6 +380,9 @@ if ($action == 'show_day') $picto = 'calendarday'; } +$nav .= $form->selectDate($dateselect, 'dateselect', 0, 0, 1, '', 1, 0); +$nav .= ' '; + // Must be after the nav definition $param .= '&year='.$year.'&month='.$month.($day ? '&day='.$day : ''); //print 'x'.$param;