I have a textfield with input only and no max limit set on the size of the input. Now when I enter large numbers the number gets converted into 1e
notation.
ex:
I;m using EXTJs as my code base: code:
$cls.superclass.constructor.call(this, Ext.apply({
items: [
this.section({
items: [{
xtype: 'container',
items: [
this.limit = new Ext.form.NumberField({
cls: "limit-number-field",
allowBlank: false,
allowNegative: false,
allowDecimals: false,
width: 150
})
]
}]
})
]
}, cfg));
also here are the logs of the numbers I have tried with toFixed()
and they all give me same o/p. not sure what im doing wrong here.
how to prevent this from happening. I want the number to be there in the input field as is.
PS> I referred to How to avoid scientific notation for large numbers in JavaScript? but this did not work for me. any ideas?