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

    Format number on q-input

    Framework
    2
    4
    1978
    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.
    • P
      Pedro last edited by

      I have a q-input bound to the v-model.
      The value in model is 12345.6
      I need to show it like : 12.345,60
      But the value in model must continue to be numeric … 12345.6
      Is it possible to format number just for display ?
      My q-input :
      <q-input type=“number” class=“q-pl-sm” dense label=“Total” v-model=“valor” input-class=“text-right text-bold”></q-input>

      Thanks

      1 Reply Last reply Reply Quote 0
      • P
        Pedro last edited by

        sorry for ask it again, but I think that’s a common situation on countries that use comma as decimal point.
        Somebody has a trick for that ?

        Tks

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

          @Pedro use v-money or search for a regular expression for formatting your input under your country’s locale.

          1 Reply Last reply Reply Quote 0
          • P
            Pedro last edited by

            I quit trying to use v-money. Tried to install it but get lots of dependencies warnings. Maybe I had something wrong in my project because after trying to upgrade all installed modules to the latest versions the project was not compiling any more.
            Had to make a new project and copy the old src files.

            Tks

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