PDA

View Full Version : [OPEN-1141] Ext.util.Format.number Bug



adam3342
20 Jul 2010, 7:56 PM
Win Xp
ExtJs 3.2.2

Hi,

I found a bug, the formatted result of Ext.util.Format.number(val,'0,0.00') in IE does not consist with the one in Firefox for the value between -0.01 and 0.01.

For example:

-0.0051, 0.0051 will be formatted as -0.01, 0.01 in FF, whereas -0.00, 0.00 in IE

Thanks,
Adam

Condor
21 Jul 2010, 12:21 AM
I don't think there is much we can do about this.

The Number.toFixed method in IE is wrong:

0.0051.toFixed(2) == '0.00'

j-joey
21 Jul 2010, 4:08 AM
applying round before applying toFixed will fix this.

Jamie Avins
21 Jul 2010, 9:27 AM
Nice Joey, we'll try to get that in the library.