Private GIT

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

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

parent 383a4c20
No related branches found
No related tags found
No related merge requests found
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
<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} {$date_start} {$to} {$date_end} &nbsp;&nbsp;&nbsp;{$period_name} <span class="isTimestamp isDate">{$date_start} </span> {$to} <span class="isTimestamp isDate"> {$date_end}</span>
{/if} {/if}
</form> </form>
</td> </td>
...@@ -146,8 +146,11 @@ ...@@ -146,8 +146,11 @@
</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',
onSelect : function(data){ onSelect : function(data){
......
...@@ -130,9 +130,9 @@ if (isset($id) && $id != "NULL") { ...@@ -130,9 +130,9 @@ if (isset($id) && $id != "NULL") {
$tpl->assign("components", $hostgroupFinalStats); $tpl->assign("components", $hostgroupFinalStats);
$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