Set default time for date-picker

  • I have a form that filters some data set. It has from and to input fields, like this one:

    <q-input v-model="fromDate" mask="date" :rules="[v => v === null || v.length === 0 || /^-?[\d]+\/[0-1]\d\/[0-3]\d$/.test(v)]" >
         <q-popup-proxy ref="qFromDateProxy" >
           <q-date today-btn v-model="fromDate" @input="() => $refs.qFromDateProxy.hide()" title="From date" subtitle=" " >
                <div class="row items-center justify-end q-gutter-sm">
                    <q-btn label="OK" color="primary" flat v-close-popup />

    I would like both from/to fields to be inclusive in my filter, therefore I’d like the default time for the To field to be 23:59:59 (the default is 00:00:00 which is good for the from field). However, I don’t want to show the time or to allow users choosing it.
    How can I achieve this?

Log in to reply