Home › Forums › Bugs › Breaking change in DateFormat for non-string value
There appears to be a breaking change in the 3.8.2 version of DateFormat function (ln. 128 of jquery.fmatter.js) where the regex tests for a Microsoft format string.
Hello ksherratt,
Probably one can fix the bug by changing the line 120 of the jquery.fmatter.js from
msMatch = date.match(msDateRegExp),
to the following
msMatch = ((typedef date === 'string') ? date.match(msDateRegExp): null),
Would the change solve your problem?
Best regardsOleg
OlegK said: msMatch = ((typedef date === 'string') ? date.match(msDateRegExp): null), Would the change solve your problem?
OlegK said: msMatch = ((typedef date === 'string') ? date.match(msDateRegExp): null),
s/typedef/typeof/
Yep, that's essentially what I did.
Thanks! Of course typeof date must be used instead of
Thank you,
Will be fixed.
Tony
as a suggestion – perhaps should also allow formatter to fail gracefully?
so in jquery.fmatter line 58:
try {
v = $.fn.fmatter[formatType](cellval, opts, rwd, act); }
catch(ex) {
Stay connected with us in your favorite flavor!
Copyright 2014 TriRand LtdAll Rights ReservedRSS