Results 1 to 2 of 2

Thread: Date in GridPanel showing in wrong format

  1. #1
    Ext JS Premium Member
    Join Date
    Apr 2009

    Default Date in GridPanel showing in wrong format

    A grid with an editable datefield. The server returns dates in yyyy-MM-dd format. The store looks like:
    var gridStore = new{
        autoDestroy: true,
        id: 'gridStore',
        url: 'get_my_data_tab.php',
        storeId: 'dataTabStore',
        root: 'rows',
        idProperty: 'd_entry_date',
        fields: [{name:'d_entry_date', type: 'date', dateFormat: 'Y-m-d'}, 
                  'd_last_date', 'd_value', 'd_delta', 'd_percent']
    The date column in the column model looks like:

            columns: [{
                id: 'col_d_entry_date',
                header: 'Date',
                dataIndex: 'd_entry_date',
                format: 'Y-m-d',
                width: 220,
                // use shorthand alias defined above
                editor: new Ext.form.DateField({
                    format: 'Y-m-d',
                    allowBlank: false
          } [...etc]
    I've tried various iterations with various symptoms. The current one is that the date shows in full UTC style when loading, Y-m-d format while editing, and then back to UTC when finished editing. Before I specified the type on the store, it would load right, but then turn to UTC after edit, so it was working closer to right, but it seems like specifying the type should be a good thing.

    All i want is simply Y-m-d all the way through. What am I doing wrong here?

  2. #2
    Sencha User
    Join Date
    Apr 2008
    Hong Kong


    try add
    dataIndex: 'd_entry_date',
    xtype: 'datecolumn',
    to your column.

Similar Threads

  1. last column wrong format
    By tomg65 in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 11 Mar 2010, 8:09 PM
  2. Replies: 2
    Last Post: 23 Mar 2009, 12:44 AM
  3. How to change date format after a date field has been created?
    By lensesby in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 3 Mar 2009, 7:11 AM
  4. date format on grid. Format is not displayed as expected.
    By mcrusty in forum Ext 1.x: Help & Discussion
    Replies: 3
    Last Post: 26 Jan 2007, 4:05 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts