Private GIT

Skip to content
Snippets Groups Projects
Commit f3f9a99c authored by Stephane Chapron's avatar Stephane Chapron Committed by sc979
Browse files

feat(date): Formatting date in Reporting Dashboard ServiceGroup DatepickerResult

parent d1ad2110
Branches
Tags
No related merge requests found
...@@ -15,8 +15,9 @@ ...@@ -15,8 +15,9 @@
<!-- servicegroup selection --> <!-- servicegroup selection -->
<form {$formItem.attributes} style="margin:0px;padding:0px;"> <form {$formItem.attributes} style="margin:0px;padding:0px;">
&nbsp;{$formItem.item.label}:&nbsp;&nbsp;{$formItem.item.html}{$formItem.hidden} &nbsp;{$formItem.item.label}:&nbsp;&nbsp;{$formItem.item.html}{$formItem.hidden}
{if $date_start != 0} {if $date_start != 0}&nbsp;&nbsp;&nbsp;{$period_name}
&nbsp;&nbsp;&nbsp;{$period_name} {$date_start} {$to} {$date_end} <!-- using a span to add a class to format the timestamp -->
<span class="isTimestamp isDate">{$date_start} </span> {$to} <span class="isTimestamp isDate"> {$date_end}</span>
{/if} {/if}
</form> </form>
</td> </td>
...@@ -158,8 +159,10 @@ ...@@ -158,8 +159,10 @@
</tr> </tr>
</table> </table>
<script>
{literal} {literal}
<script>
//formatting the tags containing a class isTimestamp
formatDateMoment();
jQuery("#StartDate").datepicker({ jQuery("#StartDate").datepicker({
maxDate: '-1', maxDate: '-1',
......
...@@ -119,9 +119,9 @@ if (isset($id) && $id != "NULL") { ...@@ -119,9 +119,9 @@ if (isset($id) && $id != "NULL") {
$tpl->assign("components", $servicesgroupFinalStats); $tpl->assign("components", $servicesgroupFinalStats);
$tpl->assign('period_name', _("From")); $tpl->assign('period_name', _("From"));
$tpl->assign('date_start', date(_("d/m/Y H:i"), $start_date)); $tpl->assign('date_start', $start_date);
$tpl->assign('to', _("to")); $tpl->assign('to', _("to"));
$tpl->assign('date_end', date(_("d/m/Y H:i"), $end_date)); $tpl->assign('date_end', $end_date);
$tpl->assign('period', $period); $tpl->assign('period', $period);
$formPeriod->setDefaults(array('period' => $period)); $formPeriod->setDefaults(array('period' => $period));
$tpl->assign('id', $id); $tpl->assign('id', $id);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment