Problem with Date and $.ajax
in Using jQuery
•
13 years ago
Hi all,
First I would like to thank the jQuery team for this new release! It looks extremely promising.
Btw, I just updated a test page to jQuery 1.4 and now I am getting the following error:
"this.toDateString" is not a function
when a Date object is created within the scope of an $.ajax call
The error is generated by the following:
In that case "this", inside Date.prototype, is the "window" object (hence the error message).
The error occurs (so far) only when jQuery needs to create a Date object within the $.ajax function (i.e. parsing the response if dataType=json or when you put some Dates in the request data object attributes).
1