1. #1
    Sencha User
    Join Date
    Jul 2011
    Posts
    14
    Vote Rating
    0
    emilyberk is on a distinguished road

      0  

    Default Answered: Formatting date in rowexpander xtemplate

    Answered: Formatting date in rowexpander xtemplate


    I Know there are several forum threads about this but none of the solutions work for me.

    In my xtemplate for my row expander I have a date field that I want to format
    Code:
    plugins: [{
            ptype: 'rowexpander',
            rowBodyTpl: this.something.getRowBodyXTemplate()
          }],
    the function getRowBodyXTemplate returns the xtemplate string which is like this

    Code:
    '<td > <p> discovered {discovered_at}</p> </td>'
    it's the discovered_at Date that i need to format.

    it's specified in the model as

    Code:
          
    { name: 'discovered_at', type: 'date'},
    and i tried this but my date came up undefined
    Code:
          
    { name: 'discovered_at', type: 'date', dateFormat: 'n-j-Y g:i A'},
    help?

  2. Try reverting your model to

    Code:
    { name: 'discovered_at', type: 'auto' },
    , and changing your template string to:

    Code:
    '<td><p> discovered {discovered_at:date("n-j-Y g:i A")}</p></td>'
    http://docs.sencha.com/ext-js/4-0/#/api/Ext.util.Format gives other examples of what you can do with format functions in templates.

    hope this helps,

    stevil

  3. #2
    Ext JS Premium Member stevil's Avatar
    Join Date
    Nov 2007
    Location
    Denver, CO
    Posts
    1,045
    Answers
    15
    Vote Rating
    9
    stevil will become famous soon enough

      0  

    Default


    Try reverting your model to

    Code:
    { name: 'discovered_at', type: 'auto' },
    , and changing your template string to:

    Code:
    '<td><p> discovered {discovered_at:date("n-j-Y g:i A")}</p></td>'
    http://docs.sencha.com/ext-js/4-0/#/api/Ext.util.Format gives other examples of what you can do with format functions in templates.

    hope this helps,

    stevil

  4. #3
    Sencha User
    Join Date
    Jul 2011
    Posts
    14
    Vote Rating
    0
    emilyberk is on a distinguished road

      0  

    Default


    thanks so much. It works

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi