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

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar