Results 1 to 3 of 3

Thread: Removing number formatting from numberfield

  1. #1
    Sencha User
    Join Date
    Jan 2009
    Posts
    11
    Vote Rating
    0
      0  

    Question Removing number formatting from numberfield

    Hello,

    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.

  2. #2
    Sencha User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,062
    Answers
    3976
    Vote Rating
    1391
      0  

    Default

    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 @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    https://github.com/mitchellsimoens

  3. #3
    Sencha User
    Join Date
    Jan 2009
    Posts
    11
    Vote Rating
    0
      0  

    Default

    Hi mitchel,

    Thanks, the problem is that the formatting occurs when the textfield loses focus or when I use setValue().

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •