Tobias2200
20 Nov 2011, 12:47 PM
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.
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?
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.
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?