Skip to content

Instantly share code, notes, and snippets.

@ignaciogutierrez
Created November 21, 2022 19:30
Show Gist options
  • Save ignaciogutierrez/78d1d22877a75d017085d43638fcce6f to your computer and use it in GitHub Desktop.
Save ignaciogutierrez/78d1d22877a75d017085d43638fcce6f to your computer and use it in GitHub Desktop.
Quasar2 Vue3 QDate close on Selection
<template>
<div class="col q-ma-xs q-gutter-y-xs">
<div class="text-h4 q-mb-sm">Test QDate</div>
<div class="row q-gutter-x-xs">
<q-input label="First Name" v-model="firstname" outlined dense />
<q-input label="Last Name" v-model="lastname" outlined dense />
</div>
<div class="row q-gutter-x-sm">
<q-input label="Date of Birth" v-model="dofb" outlined dense>
<template v-slot:append>
<q-icon name="event" class="cursor-pointer">
<q-popup-proxy ref="qpopup1">
<q-date
v-model="dofb"
mask="MM-DD-YY"
today-btn
@update:modelValue="qpopup1.hide()"
>
</q-date>
</q-popup-proxy>
</q-icon>
</template>
</q-input>
</div>
</div>
</template>
<script setup>
import { ref } from "vue";
const firstname = ref("");
const lastname = ref("");
const dofb = ref("");
const qpopup1 = ref(null);
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment