-
30 Apr 2012 12:57 AM #1
number format
number format
I need to set decimal in this way:
5,3 -> 5,30
I try to use this code but the char '0' doesn't appear.
Ext.override(Ext.form.NumberField, {
setValue: function(v) {
this.decimalSeparator= ',';
if (v){
v= v.toFixed(2);
}
return Ext.form.NumberField.superclass.setValue.call(this, v);
}
});
-
4 May 2012 9:49 AM #2
Have a look at: Ext.util.Format.number
Regards,Code:> val = 5.3; > fmtVal = Ext.util.Format.number(val, '0,000.00'); // see /i for local separators. ? 5.30
Scott.
-
6 May 2012 10:00 PM #3
-
7 May 2012 12:09 AM #4
-
9 May 2012 9:12 AM #5
-
9 May 2012 10:32 AM #6
Do you have a locale locale file that may be overriding thousandSeparator?
Scott.


Reply With Quote
