1. #1
    Ext JS Premium Member
    Join Date
    May 2008
    Posts
    368
    Vote Rating
    3
    ttbgwt is on a distinguished road

      0  

    Default Unanswered: Ext.util.Format.date question

    Unanswered: Ext.util.Format.date question


    Why does this:
    Code:
    Ext.util.Format.date('2012-09-14', 'Y/m/d');
    return this? 2012/09/13 and not 2012/09/14

  2. #2
    Sencha User mberrie's Avatar
    Join Date
    Feb 2011
    Location
    Bangkok, Thailand
    Posts
    507
    Answers
    26
    Vote Rating
    14
    mberrie will become famous soon enough mberrie will become famous soon enough

      0  

    Default


    Not for me, on 4.1.1 - check out this jsFiddle: http://jsfiddle.net/bJ2qs/

  3. #3
    Ext JS Premium Member
    Join Date
    May 2008
    Posts
    368
    Vote Rating
    3
    ttbgwt is on a distinguished road

      0  

    Default


    hmm... I just ran your fiddle and I still get same results

    ext-ss.png

  4. #4
    Touch Premium Member suzuki1100nz's Avatar
    Join Date
    Apr 2011
    Location
    New Zealand
    Posts
    434
    Answers
    21
    Vote Rating
    37
    suzuki1100nz has a spectacular aura about suzuki1100nz has a spectacular aura about suzuki1100nz has a spectacular aura about

      0  

    Default


    Hi what browser and what ExtJS version - I tested it in Chrome, IE9, Firefox with ExtJS 4.1.1 and it worked fine

  5. #5
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,635
    Answers
    613
    Vote Rating
    400
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    What I use is:

    For format.date, use:
    Ext.util.Format.date('2012/09/14', 'Y/m/d');
    For the field define for date field use:
    { name : 'date_field', type : 'date', dateFormat : 'Y-m-d' },
    Scott.

  6. #6
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,108
    Answers
    345
    Vote Rating
    503
    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


    Note:

    The value to format. If a string is passed, it is converted to a Date by the Javascript's built-in Date.parse method.
    What does Date.parse return on that string?
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  7. #7
    Ext JS Premium Member
    Join Date
    May 2008
    Posts
    368
    Vote Rating
    3
    ttbgwt is on a distinguished road

      0  

    Default


    Code:
    Ext.getBody().update(Date.parse('2012-09-14'));
    


    returns this: 1347580800000

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