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
    Aug 2013
    Posts
    61
    Answers
    1
    Vote Rating
    0
    kumar_Rajesh78 is on a distinguished road

      0  

    Default Unanswered: GridColumn Date showing wrong date

    Unanswered: GridColumn Date showing wrong date


    Dear all,
    I am struggling to figure out a problem related to Date.
    problem 1) The date returned in the Json is 02/28/10, but when it displays in the grid, it shows it as 02/17/10 which is one less than the returned date.
    problem 2) : This date does not work in IE at all, it displays it as NaN/NaN/NaN in date column.
    This is how I have defined, Grid, and Store.

    Grid:


    Code:
     {   xtype: 'datecolumn',
                    dataIndex: 'createDate',
                    header: 'Create Date',
                    renderer: Ext.util.Format.dateRenderer('m/d/y'),
                    width: 100
     },
    Store:
    Code:
    {
                 xtype: 'datefield',
                 name: 'createDate',
                 dateFormat:'m/d/Y'
             },
    Any help will be highly appreciated.

  2. #2
    Sencha User
    Join Date
    Aug 2013
    Posts
    28
    Answers
    9
    Vote Rating
    8
    Scott Mildenberger will become famous soon enough

      1  

    Default


    I was having this issue just last week. I think it is because it is converting the JSON date at a 00:00 time to a date in your time zone. In my case it was making it 6 hours earlier which is the day before. I did get this fixed and I think it was by adding the 'type' line to my model, see below.. This avoided the time zone conversion as I call it. If this doesn't fix it for you then I might be able to look deeper at my code. I was changing a lot of things trying to fix it so not positive what made it work but I think it was by adding the 'type'.

    Code:
            {
                dateFormat: 'Y-m-d',
                name: 'DUEDATE',
                type: 'date'
            },

  3. #3
    Sencha User
    Join Date
    Aug 2013
    Posts
    61
    Answers
    1
    Vote Rating
    0
    kumar_Rajesh78 is on a distinguished road

      0  

    Default Not working

    Not working


    Thanks for the response.
    However it is not working for me.
    I tried to use the type:'date'. but IE does not display anything now. Its just blank. and the Chrome displays the date of one day before.

  4. #4
    Sencha User
    Join Date
    Aug 2013
    Posts
    28
    Answers
    9
    Vote Rating
    8
    Scott Mildenberger will become famous soon enough

      1  

    Default


    The only other things I can see different in my code is that I don't have an xtype in my model and the xtype of my grid column is 'gridcolumn'.

    I put my model code in my last post and here is my column definition.

    Code:
                                    {
                                        xtype: 'gridcolumn',
                                        renderer: function(value, metaData, record, rowIndex, colIndex, store, view) {
                                            return Ext.util.Format.date(value,'m/d/Y');
                                        },
                                        width: 90,
                                        dataIndex: 'ADDDATE',
                                        text: 'Date'
                                    }
    That may be all I can offer for help unfortunately.

  5. #5
    Sencha User
    Join Date
    Aug 2013
    Posts
    61
    Answers
    1
    Vote Rating
    0
    kumar_Rajesh78 is on a distinguished road

      0  

    Default Thanks for the answer - I will try again

    Thanks for the answer - I will try again


    Thanks a lot Scott for trying to help me.
    I will try the last thing that you posted and see if it works.

    In general, I feel that Extjs4 does not have a great support for Date feature, especially with more restrictive browsers like IE.

    Thanks again,
    Rajesh

  6. #6
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,619
    Answers
    426
    Vote Rating
    581
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    This is covered in the docs: http://docs.sencha.com/extjs/4.2.2/#...cfg-dateFormat

    If you don't specify a dateFormat you're leaving it up to the browser on how to parse it, which differs between implementations.
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

Thread Participants: 2

Tags for this Thread