|
[TS]
import { Component, ViewEncapsulation, ViewChild } from '@angular/core';
import { EJ_GANTT_COMPONENTS } from 'ej-angular2/src/ej/gantt.component';
import './helperfunction.js';
[JS]
function _getTime(date) {
return ej.format(new Date(date), "hh:mm");
}
//Here, used the helper function to get the date and time value part from the StartTime.
$.views.helpers({
timeDisplay: _getTime
});
[HTML]
<body>
<script type="text/x-jsrender" id="tooltipTemplate">
<table>
<tr>
<td style="padding:3px"><b>Start:</b></td>
<td style="padding:3px">{{:~timeDisplay(startDate)}}</td>
</tr>
<tr>
<td style="padding:3px"><b>End:</b></td>
<td style="padding:3px">{{:~timeDisplay(endDate)}}</td>
</tr>
</table>
</script>
</body>
|