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

    [solved] QDate/QInput - Close on Selection

    Help
    3
    6
    1754
    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.
    • beatscribe
      beatscribe last edited by beatscribe

      I have two date pickers on a form that I want to have close when someone selects a date. I found this post but couldn’t really understand the answer. Is there some way to set it up where it will close whichever one opened.

      I am using Quasar v1. Here is the codepen from the original: https://codepen.io/trondulseth-me/pen/OJPqyeM

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

        You don’t need to put a method in the input event, as hide is a method.

        https://codepen.io/smolinari/pen/GRNxrEM

        Scott

        1 Reply Last reply Reply Quote 1
        • beatscribe
          beatscribe last edited by

          This post is deleted!
          1 Reply Last reply Reply Quote 0
          • beatscribe
            beatscribe last edited by

            I figured it out.

            <q-date v-model="enddate" mask="MM/DD/YYYY"
                                              @input="closeEndDate">
            
              methods: {
                closeStartDate() {
                  this.$refs.qStartProxy.hide();
                },
            

            You just have to give a ref to the proxy that is unique to each one, which I wasn’t doing.

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

              https://codepen.io/smolinari/pen/xxRWWxv

              Scott

              1 Reply Last reply Reply Quote 1
              • beatscribe
                beatscribe last edited by

                Thanks @s-molinari I see you can do it right in line too. I appreciate it!

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