Looks like we cannot reproduce this. Please provide another test case to reproduce this issue.
  1. #1
    Sencha User
    Join Date
    Nov 2011
    Posts
    21
    Vote Rating
    1
    Tobias2200 is on a distinguished road

      0  

    Exclamation Ext.Date / Date is always 'invalid date'

    Ext.Date / Date is always 'invalid date'


    I am working with a RESTful JSON-Webservice that delivers dates like this 'endDate=2011-11-15T00:00:00+01:00'.
    When I simply set the 'type' to 'date' in the model, the automatic parsing works in Chrome, but not on mobile devices.

    After some testing I found out that although the parsing works in Chrome, the __proto__ object of the date field states "Invalid Date". I guess that the mobile browser (android 2.2) does not parse this "invalid date".

    To reproduce simply execute the following, then look at the objects in Developer Tools.
    Code:
    var showtimestr = Ext.Date.format(new Date(), "Y-m-d\\TH:i:sP");
    var showtime = Ext.Date.parse(showtimestr, "Y-m-d\\TH:i:sP");
    showtimestr will be fine, and in Chrome showtime will also be fine, but the __proto__ field states 'Invalid Date'.

    Is this a (known) bug?

  2. #2
    Sencha - Sencha Touch Dev Team Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661
    Vote Rating
    21
    Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough

      0  

    Default


    Thank you for the report, we will be sure to look into it.

    Sencha Inc

    Jamie Avins

    @jamieavins

  3. #3
    Sencha - Sencha Touch Dev Team Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661
    Vote Rating
    21
    Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough

      0  

    Default


    The Invalid Date just seems to be there, on any page without any scripts loading at all... Do you have an example of the issue you are having on Android?

    Sencha Inc

    Jamie Avins

    @jamieavins

  4. #4
    Sencha User
    Join Date
    Nov 2011
    Posts
    21
    Vote Rating
    1
    Tobias2200 is on a distinguished road

      0  

    Default


    I must have done something else wrong when i first tried this.
    I tried it again now, using return Ext.Date.parse(dateString, Ext.Date.patterns.ISO8601Longest) where ISO8601Longest : "Y-m-d\\TH:i: sP" (i added a space between : and s, otherwise it will turn into a smiley) and it does work.

    Thank you for your help!

Thread Participants: 1

Tags for this Thread