1. #1
    Sencha User
    Join Date
    Jan 2013
    Posts
    13
    Vote Rating
    0
    Tremal is on a distinguished road

      0  

    Default Answered: datecolumn on grid changes the date value

    Answered: datecolumn on grid changes the date value


    Hi,

    I've writen the next code:

    Code:
    grid = Ext.create('Ext.grid.Panel', {
                store: store,
                autoScroll:true,
                layout:'fit',
                columns:[{
                    text: "${day}",
                    dataIndex: 'day',
                    width: 140,
                    filter: true,
                    sortable: true,
                    xtype: 'datecolumn',
                    format:'m/d/Y'
                },{
    The value which arrives to my browser is this one:
    Code:
    "day":"19/01/2013 00:00:00",
    (day/month/year)

    But when the table ir rendered, the date showed is 07/01/2014 (month, day, year)

    I don't understand why this change. Somebody can help me? Thanks

  2. Make sure that the field declared in your data store uses the 'dateFormat' option, something like this:

    Code:
    fields: [{
      name: 'day', type: 'date', dateFormat: 'd/m/Y H:i:s'
    }]

  3. #2
    Sencha - Community Support Team friend's Avatar
    Join Date
    Apr 2011
    Posts
    895
    Answers
    106
    Vote Rating
    27
    friend has a spectacular aura about friend has a spectacular aura about

      1  

    Default


    Make sure that the field declared in your data store uses the 'dateFormat' option, something like this:

    Code:
    fields: [{
      name: 'day', type: 'date', dateFormat: 'd/m/Y H:i:s'
    }]

  4. #3
    Sencha User
    Join Date
    Jan 2013
    Posts
    13
    Vote Rating
    0
    Tremal is on a distinguished road

      0  

    Default


    Thank you friend! This was the solution.

    In my code, the store was an Ext.data.Model.

Thread Participants: 1

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..."