Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Sencha User
    Join Date
    Jan 2011
    Posts
    2
    Vote Rating
    0
    nissan14484 is on a distinguished road

      0  

    Default Date format

    Date format


    Hi,

    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?

    Thanks,
    Nissan.

  2. #2
    Sencha User
    Join Date
    Oct 2010
    Location
    St.Petersburg
    Posts
    40
    Vote Rating
    7
    Barzoy will become famous soon enough

      0  

    Default


    Check the record definition. Config object for date field should look like
    PHP Code:
    var GridRecordClass Ext.data.Record.create([
        
    // ... 
        
    {name'some_date_field'typeExt.data.Types.DATEdateFormat'Y-m-d'}
        
    // ... 
    ]); 
    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

Thread Participants: 1

Tags for this Thread