X-Git-Url: http://git.roojs.org/?p=roojs1;a=blobdiff_plain;f=roojs-ui-debug.js;fp=roojs-ui-debug.js;h=586d92a16177cfe184c6ef042b42d013de69e24d;hp=2b5a472c39ba99c44e80ac39580701abe02f79e1;hb=19d2dea8f96416cbccaf3352b0da76f19486d34c;hpb=186ca9fae55e3679de298305d51281d256fac089 diff --git a/roojs-ui-debug.js b/roojs-ui-debug.js index 2b5a472c39..586d92a161 100644 --- a/roojs-ui-debug.js +++ b/roojs-ui-debug.js @@ -19369,6 +19369,10 @@ Roo.extend(Roo.form.NumberField, Roo.form.TextField, { * @cfg {String} decimalSeparator Character(s) to allow as the decimal separator (defaults to '.') */ decimalSeparator : ".", + /** + * @cfg {String} thousandSeparator Character(s) to allow as the thousand separator (defaults to '') - set to ',' for example + */ + thousandSeparator : "", /** * @cfg {Number} decimalPrecision The maximum precision to display after the decimal separator (defaults to 2) */ @@ -19453,7 +19457,7 @@ Roo.extend(Roo.form.NumberField, Roo.form.TextField, { // private parseValue : function(value){ - value = parseFloat(String(value).replace(this.decimalSeparator, ".")); + value = parseFloat(String(value).replace(this.decimalSeparator, ".").replace(this.thousandSeparator, '')); return isNaN(value) ? '' : value; }, @@ -19468,6 +19472,9 @@ Roo.extend(Roo.form.NumberField, Roo.form.TextField, { setValue : function(v){ v = this.fixPrecision(v); + if(this.thousandSeparator != ''){ + v = Roo.util.Format.number(v, this.decimalPrecision, this.thousandSeparator); + } Roo.form.NumberField.superclass.setValue.call(this, String(v).replace(".", this.decimalSeparator)); },