link41489
5 Dec 2011, 9:28 AM
Hi,
I'm new to Ext-js and am still learning. My question is, I have a xtype "NumberField" which has the config property "allowDecimals" set to false when the object is created. The reason why the field is set to false is because depending on what the user selects (i.e cost or quantity) the field should allow and not allow the use of decimals. I've found on the form that some config properties are only readable but looking at the doc for the "allowDecimals" config property, its not. So, while debugging in Chrome, I've tried calling:
Ext.apply(numField, {allowDecimals: true}) and I can see after the call that the property is changed but yet the field does not allow me to enter decimal values. However, in my code, when the numberfield is created, if I set the allowDecimal to true, it does allow me to enter decimals values but then brings up the issue of not allowing decimal input when the user selects "Quantity".
If anyone can direct me to a source or give me some insight on this, I would greatly appreciate it.
Thanks!
I'm new to Ext-js and am still learning. My question is, I have a xtype "NumberField" which has the config property "allowDecimals" set to false when the object is created. The reason why the field is set to false is because depending on what the user selects (i.e cost or quantity) the field should allow and not allow the use of decimals. I've found on the form that some config properties are only readable but looking at the doc for the "allowDecimals" config property, its not. So, while debugging in Chrome, I've tried calling:
Ext.apply(numField, {allowDecimals: true}) and I can see after the call that the property is changed but yet the field does not allow me to enter decimal values. However, in my code, when the numberfield is created, if I set the allowDecimal to true, it does allow me to enter decimals values but then brings up the issue of not allowing decimal input when the user selects "Quantity".
If anyone can direct me to a source or give me some insight on this, I would greatly appreciate it.
Thanks!