captbaritone / captbaritone/datejs
jquery 1.4.2 serialization breaks with datejs
- Dominant language
- JavaScript
- Stars
- 1
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
```
What steps will reproduce the problem?
1. include jquery and datejs into a page
2. create an object: var myVar = {key: new Date()}
3. call alert( jQuery.param( myVar ) )
What is the expected output? What do you see instead?
When datejs is not included, it produces a url encoded string with url encoded
date.
Instead an error is thrown saying that this.setHour is not a function.
What version of the product are you using? On what operating system?
1.0 Alpha-1 @date 2008-05-13
Please provide any additional information below.
I guess it comes from the jQuery 1.4.2 new serialization system, as when I use
ajaxSettings.traditional = true it works fine.
the serialization process tries to serialize every property, and if property is
a function it is executed.
the way to read properties is for( .. in ...), so every function added to $D is
executed.
Maybe it could be a nice thing not to extend the native Date object but to have
a Datejs object instead, and have a config option to tell wether to extend
native too.
```
Original issue reported on code.google.com by `the.moue...@gmail.com` on 4 Aug 2010 at 8:18
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.