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

    QInput with mask, default value is not display at the first time.

    Help
    2
    3
    1659
    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.
    • C
      christian_f last edited by

      Hi

      I start to use the mask option on QInput field, but when I set a default value on the model, this value is not displayed in the field.
      If I create a second QInput field linked with the same model , without mask, the default value is correctly displayed.
      When I focus and change a value in one of the 2 fields, the relation with the model is correct and the 2 fields are updated.

      It should be so simple, there would be an additional parameter?

      https://codepen.io/christian_f/pen/agELpM

      Quasar V1.0.0-rc.7

      Regards.

      1 Reply Last reply Reply Quote 0
      • metalsadman
        metalsadman last edited by metalsadman

        @christian_f see the “warning” https://quasar.dev/vue-components/input#Mask, you’re giving your model a number (should be a string), here https://codepen.io/metalsadman/pen/zVpPVZ?editors=1111.

        1 Reply Last reply Reply Quote 0
        • C
          christian_f last edited by

          ok, I saw the warning in the documentation… but I assumed it was the “QInput type”, which can be <Accepted values : text | password | textarea | email | search | tel | file | number | url | time | date>. So I change from “number” to “text” only at this location.
          As my model is a numeric value, I added a computed function to cast from number to string, and now all is fine.
          Thanks

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