PDA

View Full Version : [CLOSED] Format Date inside ItemTpl



cwolcott
May 06, 2014, 6:30 PM
Is there a way to format values inside an ItemTpl or do I need to format it when adding it to the store?

I have a combobox that lists items. I want to added the date they were activated (Month Year).



<ListConfig runat="server">
<ItemTpl runat="server">
<Html>{FullNm} [{DateActivated}]
</ItemTpl>
</ListConfig>


I would like the DateActivated to be formatted as MMM YYYY. Ext.Date.format({DateActivated}, 'M Y').

geoffrey.mcgill
May 06, 2014, 6:58 PM
Hi Chris,

The following should work.

Example


<ListConfig runat="server">
<ItemTpl runat="server">
<Html>{FullNm} [{DateActivated:date('M Y')}]
</ItemTpl>
</ListConfig>

Hope this helps.

cwolcott
May 07, 2014, 12:01 PM
Perfect. Please close the thread.