No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    q-inpt type number showed as a type text

    Framework
    2
    3
    421
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • rami.almofleh
      rami.almofleh last edited by

      I have a problem with an input from type number, that behaves like an input of type text.
      On my iPhone I can write text and all special character in this input.

      screenshot from website on my iPhone:
      99297BEE-2EB7-482A-B37E-EEF7E52236EB..jpg

      screenshot from my app:
      D94E75ED-5D31-450B-B8B5-725DA884A3AB..png

      So please Help!

      1 Reply Last reply Reply Quote 0
      • s.molinari
        s.molinari last edited by

        Is this Safari? If yes, it’s the way Safari handles number inputs.

        If you only need positive integers without any thousands , you could try a fix with the attribute pattern="[0-9]*", which will only give the user a numeric 0-9 keyboard on an iPhone. In other words, they simply can’t input anything else.

        Or, you could set up an event catch to prevent any keys being added to the input value other than proper numeric ones.

        Something like this: https://codepen.io/smolinari/pen/MNoyvr

        Note though, it doesn’t pop up a number keyboard. And, strangely enough, if you add type=number, Safari then allows characters anyway. I have no clue why. Safari is the new IE. 😁

        Scott

        1 Reply Last reply Reply Quote 0
        • rami.almofleh
          rami.almofleh last edited by

          Thank you that worked for me!!

          1 Reply Last reply Reply Quote 0
          • First post
            Last post