[CLOSED] Format Date inside ItemTpl

  1. #1

    [CLOSED] Format Date inside ItemTpl

    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').
    Last edited by Daniil; May 07, 2014 at 12:26 PM. Reason: [CLOSED]
  2. #2
    Hi Chris,

    The following should work.

    Example

    <ListConfig runat="server">
       <ItemTpl runat="server">
          <Html>{FullNm} [{DateActivated:date('M Y')}]
       </ItemTpl>
    </ListConfig>
    Hope this helps.
    Geoffrey McGill
    Founder
  3. #3
    Perfect. Please close the thread.

Similar Threads

  1. [CLOSED] How can I change fields inside <ItemTpl> in client side
    By crsodre in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Dec 17, 2013, 9:16 PM
  2. Replies: 8
    Last Post: May 20, 2013, 4:01 AM
  3. Replies: 3
    Last Post: May 09, 2012, 4:28 PM
  4. Replies: 1
    Last Post: Apr 13, 2012, 1:52 PM
  5. [CLOSED] Format the date inside ComboBox
    By mattwoberts in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Mar 11, 2011, 8:22 AM

Posting Permissions