Hi all,

 

I am currently using a template to generate rows in my table in my view.

 

Date formatting appears to be non-trivial in these templates.

 

Code attached below. In the line with data-bind="text: ForDate, visible:
DisplayMode" I have tried to put a data-format attribute, which doesn't
work.

 

Can someone tell me how I'm supposed to perform date formatting using these
templates?

 

Regards,

Tony

 

<!--====== Template ======-->

<script type="text/html" id="TimesheetItemTemplate">    

 

<tr data-bind="style: { background: viewModel.SetBackgroundColor($data) }">

  <td style="height:25px"><div data-bind="text: TimesheetItemId"></div></td>

  <td><div data-format="{0:dd/MM/yyyy}" data-bind="text: ForDate, visible:
DisplayMode "></div>

      <div data-bind="text: ForDate, visible: EditMode "></div>

  </td>

</tr>

 

</script>

Reply via email to