22 Mar 2012 8:33 AM #1
Unanswered: Removing number formatting from numberfield
I want to place a textfield for the user to capture his phone number. As I want a numeric keypad to appear, I was looking to implement a numberfield.
The first problem is that maxLength doesn't work, so I implemented a listener to overcome that.
However my issue now is that on Safari Browser the numberfield formats automatically the resulting value with thousands separator.
I guess that this behavior is because of the browser implementation of number imput, but is there any way to disable this formatting from sencha configurations?
Thanks in advance.
22 Mar 2012 11:51 AM #2
- Join Date
- Mar 2007
- Gainesville, FL
- Vote Rating
If you want special formatting then you could go with a textfield and prevent keys to be typed in a keydown listener stopping the event.Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Software Engineer
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services email@example.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!
When posting code, please use BBCode's CODE tags.
22 Mar 2012 1:37 PM #3
Thanks, the problem is that the formatting occurs when the textfield loses focus or when I use setValue().