X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=roojs-debug.js;h=c5d90a13e9cf2612704bbc513188161872e2297e;hb=19d2dea8f96416cbccaf3352b0da76f19486d34c;hp=a82eef944f4bcf50095a4f9a77444d6bd80dc8e4;hpb=186ca9fae55e3679de298305d51281d256fac089;p=roojs1 diff --git a/roojs-debug.js b/roojs-debug.js index a82eef944f..c5d90a13e9 100644 --- a/roojs-debug.js +++ b/roojs-debug.js @@ -43871,6 +43871,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) */ @@ -43955,7 +43959,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; }, @@ -43970,6 +43974,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)); },