X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/25ef3491bd9ae007ff1fc2b0d7943e6eaaccf775..6e39d509471fe9b4e2660e0d1631b350d0c66f40:/docs/source/NumberField.html diff --git a/docs/source/NumberField.html b/docs/source/NumberField.html index 10c49ed9..eb61ed86 100644 --- a/docs/source/NumberField.html +++ b/docs/source/NumberField.html @@ -1,17 +1,12 @@ - - - The source code - - - - -
/*!
- * Ext JS Library 3.0.3
- * Copyright(c) 2006-2009 Ext JS, LLC
- * licensing@extjs.com
- * http://www.extjs.com/license
- */
-
/** + + + + The source code + + + + +
/** * @class Ext.form.NumberField * @extends Ext.form.TextField * Numeric text field that provides automatic keystroke filtering and numeric validation. @@ -116,10 +111,26 @@ Ext.form.NumberField = Ext.extend(Ext.form.TextField, { }, setValue : function(v){ - v = typeof v == 'number' ? v : parseFloat(String(v).replace(this.decimalSeparator, ".")); + v = Ext.isNumber(v) ? v : parseFloat(String(v).replace(this.decimalSeparator, ".")); v = isNaN(v) ? '' : String(v).replace(".", this.decimalSeparator); return Ext.form.NumberField.superclass.setValue.call(this, v); }, + +
/** + * Replaces any existing {@link #minValue} with the new value. + * @param {Number} value The minimum value + */ + setMinValue : function(value){ + this.minValue = Ext.num(value, Number.NEGATIVE_INFINITY); + }, + +
/** + * Replaces any existing {@link #maxValue} with the new value. + * @param {Number} value The maximum value + */ + setMaxValue : function(value){ + this.maxValue = Ext.num(value, Number.MAX_VALUE); + }, // private parseValue : function(value){ @@ -143,6 +154,6 @@ Ext.form.NumberField = Ext.extend(Ext.form.TextField, { } } }); -Ext.reg('numberfield', Ext.form.NumberField);
- +Ext.reg('numberfield', Ext.form.NumberField);
+ \ No newline at end of file