Results 1 to 2 of 2

Thread: Date format

  1. #1
    Sencha User
    Join Date
    Jan 2011
    Vote Rating

    Default Date format


    I'm trying to build an editorGridPanel, and I'm having some trouble with the date cells.

    For some reason, when I define a column to be date formatted, although I define it as 'Y-m-d' it shows a full date with a GMT code... for example: instead of showing 2011-02-04, it will show:
    Fri Feb 04 2011 00:00:00 GMT+2000....

    Once I tried to change the format from 'date' to 'string', the date looked as I wished.
    but than I got into a new problem: if I want the date to be editable as date, I must define him as 'date' in the editor definition. but in that case, after the edit will be fired, the cell format will be 'date' again and not string, and than the cell will once again - show Fri Feb 04 2011 00:00:00 GMT+2000 instead of 2011-02-04....

    Am I missing something here? Can anyone help me please?


  2. #2
    Sencha User
    Join Date
    Oct 2010
    Vote Rating


    Check the record definition. Config object for date field should look like
    PHP Code:
    var GridRecordClass[
    // ... 
    // ... 
    Records "dateFormat" config option is used by DataReader to convert date values from string to Date object, while columns "format" config option is used to convert Date objects into string to display inside grid cell.
    Think less, write more.

Similar Threads

  1. Date Format + Date Column on Grid
    By smichels in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 22 Jul 2010, 8:25 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

Tags for this Thread

Posting Permissions

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