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

    How to add phone mask in the input ?

    Show & Tell
    5
    9
    6394
    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.
    • E
      Evandro P. last edited by

      Is there some way to create mask in the input like a phone mask for example ?

      1 Reply Last reply Reply Quote 0
      • E
        Evandro P. last edited by Evandro P.

        I have been using vue-mask (https://github.com/probil/v-mask) in other projects without quasar-framework and it works great but it caused a “conflict” when I tried to add vue-mask in a quasar-framework project. Has anyone had the same problem?

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

          What is the conflict? Any errors?

          E 1 Reply Last reply Reply Quote 0
          • rstoenescu
            rstoenescu Admin last edited by

            @Evandro-P hi, can you pls open up a github request ticket? Thinking of adding this to v0.14.

            E 1 Reply Last reply Reply Quote 0
            • L
              leon last edited by

              @rstoenescu add mask to quasar ? AMAZING
              Almost 90% of admin systems have a form and mask is always user friendly.

              1 Reply Last reply Reply Quote 0
              • rstoenescu
                rstoenescu Admin last edited by

                A [Request] Input boxes with mask ticket will do. So I won’t forget. Working on a lot of stuff 🙂

                1 Reply Last reply Reply Quote 0
                • E
                  Evandro P. @Dobromir last edited by

                  @Dobromir No errors was shown. I could use. I created a new quasar project and added the v-mask. It worked perfect. But, I still do not know whats is wrong in first example.

                  1 Reply Last reply Reply Quote 0
                  • E
                    Evandro P. @rstoenescu last edited by

                    @rstoenescu Ok. I will.

                    1 Reply Last reply Reply Quote 0
                    • 2bj
                      2bj last edited by 2bj

                      import VMasker from 'vanilla-masker'
                      
                      export default {
                        data () {
                          return {
                            form: {
                              name: '',
                              phone: ''
                            }
                          }
                        },
                        watch: {
                          'form.phone' (newVal, oldVal) {
                            this.form.phone = VMasker.toPattern(newVal, '+9 (999) 999-99-99')
                          }
                        }
                      }
                      
                      1 Reply Last reply Reply Quote 0
                      • First post
                        Last post