Open GoogleCodeExporter opened 8 years ago
This also causes issues with other jQuery plugins (Datepicker, jquery-ui) that
use the Date.toString() method.
The following code at the start of the toString() function seems to fix it and
feels like a satisfactory default
if (format == undefined) format = 'u';
Original comment by philj...@hotmail.com
on 9 Jan 2012 at 8:59
Fix for this:
In the code that sets up the toString method:
Change
Date.prototype._toString=Date.prototype.toString;
to
if(Date.prototype._toString==undefined)
{Date.prototype._toString=Date.prototype.toString;}
Issue occurs when the internal function _toString gets set twice, once with the
native implementation and then again with the DateJs implementation leading to
infinite recursion of the toString function call.
Original comment by afawc...@guardianglobalam.com
on 10 Jan 2012 at 1:29
Ok I have done some digging and yes you are correct that is indeed the solution
cheers for pointing me right.
The original problem however came from my include of the core.js as well as the
date.js, it appears on closer inspection they contain the same functionality so
I will just remove core.js from my includes.
Original comment by philj...@hotmail.com
on 10 Jan 2012 at 12:16
Thanks for posting a fix! I was going to have to abandon using date.js because
of this!
Original comment by jnelso...@gmail.com
on 10 Feb 2012 at 5:39
Actually changed the lines recommended, but that doesn't seem to fix it. Still
having the recursive issue.
Original comment by jnelso...@gmail.com
on 10 Feb 2012 at 5:46
Same problem for me after the fix
Original comment by Laur3nt....@gmail.com
on 14 Feb 2012 at 3:23
Thank you very much! You saved my life ^_^
Original comment by raqy.st...@gmail.com
on 6 Jun 2012 at 7:58
Thanks for the fix; I had an issue when using this with the jquery UI
datepicker. I had to change it twice, once in date.js and once in the
date-nl-BE.js file.
Original comment by benrobb...@gmail.com
on 20 Jul 2012 at 9:23
Ah yes I use the SVN Source rather than the release download, the two versions
are fairly different, the source being more up to date amongst other things -
there are also GitHub forks with various other fixes/updates.
The source has many files but no duplication i.e. the localisation files
contain only the localisation - I then load just the localised version using
require js - though any method would work.
The release style has 1 file per localisation with all the functionality
duplicated - it means 1 file download for clients but if you need to make a
change then you have to merge through the change to every localised version.
I prefer to use some other method of merging the files and keep the
localisation separate.
Original comment by philjor...@googlemail.com
on 21 Nov 2012 at 2:22
Hey thanks for the fix, its really help full to me...............
Thanks a lot...
Original comment by abhi10...@gmail.com
on 24 Jan 2013 at 11:27
Is the fix on the svn ?
cause when I download datejs from svn, I read changelog.txt and last thing is :
2008-05-12 [geoffrey.mcgill]
Revision #191
Maybe the changelog.txt is not up to date ?
Original comment by nfourn...@ignition-factory.com
on 5 Feb 2013 at 9:37
[deleted comment]
I noticed I only get this issue if something is included twice. For me it was
because I compiled my assets (rails app) and forgot to clean them up
# this compiled them for me nicely for prod deployment
rake assets:precompile
# clean up
rake assets:clean
Hope this helps
Original comment by mrgco...@gmail.com
on 6 Mar 2013 at 3:27
Thanks a lot! fixed my problem!
Original comment by sahar...@gmail.com
on 10 Jul 2013 at 11:04
fixed in my current fork:
https://github.com/abritinthebay/datejs/
Original comment by darkcr...@gmail.com
on 14 Sep 2013 at 8:15
Thanks, works for me!
Original comment by mmuci...@gmail.com
on 25 Oct 2014 at 2:42
Original issue reported on code.google.com by
philjor...@googlemail.com
on 5 Jan 2012 at 3:53