sjivan
19 Oct 2007, 5:27 AM
Ext 1.1.1
OS : Windows
Browser : IE 6.0
There was a change in Ext 1.1.1 where NumberField.getValue now calls toFixed(..) if allowDecimals and decimalPrecision. I think this change was made in 1.1.1 because of this : http://extjs.com/forum/showthread.php?t=10418
In Ext 1.1.1
fixPrecision : function(value){
var nan = isNaN(value);
if(!this.allowDecimals || this.decimalPrecision == -1 || nan || !value){
return nan ? '' : value;
}
return parseFloat(value).toFixed(this.decimalPrecision);
}
The problem is that toFixed(..) converts the number into a String data type (tested in IE). I've locally added a parseFloat(..) call after the toFixed() to convert the String back to a number type. Does this change make sense?
Sanjiv
OS : Windows
Browser : IE 6.0
There was a change in Ext 1.1.1 where NumberField.getValue now calls toFixed(..) if allowDecimals and decimalPrecision. I think this change was made in 1.1.1 because of this : http://extjs.com/forum/showthread.php?t=10418
In Ext 1.1.1
fixPrecision : function(value){
var nan = isNaN(value);
if(!this.allowDecimals || this.decimalPrecision == -1 || nan || !value){
return nan ? '' : value;
}
return parseFloat(value).toFixed(this.decimalPrecision);
}
The problem is that toFixed(..) converts the number into a String data type (tested in IE). I've locally added a parseFloat(..) call after the toFixed() to convert the String back to a number type. Does this change make sense?
Sanjiv