View Full Version : [CLOSED]Date in Model converting to null in FireFox 4 RC

10 Mar 2011, 5:30 AM
In a Model, I have a field with type of date. In Chrome and Safari, it automatically converts it to a Date object but with Firefox 4 RC it does not. If I specify the dateFormat then it will work but why does it work without dateFormat in Chrome but not Firefox?

Is this a bug in ExtJS or Firefox? It wouldn't be a surprise if it was Firefox since if you put this into Firebug:

new Date("2011-01-01");

You will get a Date object for December 25th 19:00:00 -0500 for some odd reason. Firefox has always done something like this for as long as I can remember.

11 Mar 2011, 11:29 PM
It's a bug in your code as You should always specify dateFormat :), otherwise you will get browser specific behavior as you noted. Your code snippet does not pass valid parameters to the date constructor, see this MDC page for reference https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Date