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 - prevent Android's soft keyboard from showing automatically

    Help
    android keyboard q-input qdate qinput
    2
    4
    1031
    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.
    • B
      btree last edited by btree

      I’m using the code provided at https://quasar.dev/vue-components/date to get a date from user input.
      My problem is that on Android clicking on the date input field will bring up the calendar as well as the soft keyboard - and I don’t want the keyboard to show up since it’s not needed for selecting a date.

      Is there any way to stop the keyboard from showing up when clicking a q-input field or at least a way to hide it immediately?

      Code:

      <template>
        <div class="q-pa-md" style="max-width: 300px">
          <q-input filled v-model="date" mask="date" :rules="['date']">
            <template v-slot:append>
              <q-icon name="event" class="cursor-pointer">
                <q-popup-proxy ref="qDateProxy" transition-show="scale" transition-hide="scale">
                  <q-date v-model="date" @input="() => $refs.qDateProxy.hide()" />
                </q-popup-proxy>
              </q-icon>
            </template>
          </q-input>
        </div>
      </template>
      
      <script>
      export default {
        data () {
          return {
            date: '2019/02/01'
          }
        }
      }
      </script>
      
      metalsadman 1 Reply Last reply Reply Quote 0
      • metalsadman
        metalsadman @btree last edited by

        @btree https://codepen.io/metalsadman/pen/pozYZpd

        B 1 Reply Last reply Reply Quote 1
        • B
          btree @metalsadman last edited by

          @metalsadman Thank you, this works well for me. So is there no way to prevent the keyboard popup with qinput?

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

            @btree there might be, but that would be a hack, qinput uses native input internally, keyboard popping on mobile is normal behavior so, you will have to search out there how to do that.

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