[v1] Problem with QDate and QTime and rules
-
I have a QInput with a QDate and a QTime to process a datetime. I have a Regex that works when I type directly in the input and when I select a time, but whe I change the date with the QDate, my rules are triggered and it says that I didn’t select a good format, but my model is good.
Do I do something wrong ?
<q-input :label="$t('todo.dueDate')" filled v-model="todo.dueDate" mask="datetime" :rules="[val => $regexes.datetime.test(val) || $t('validations.datetime')]" > <template v-slot:prepend> <q-icon name="event" class="cursor-pointer"> <q-popup-proxy ref="qDateProxy" transition-show="scale" transition-hide="scale"> <q-date v-model="todo.dueDate" mask="YYYY/MM/DD HH:mm" @input="() => $refs.qDateProxy.hide()" /> </q-popup-proxy> </q-icon> </template> <template v-slot:append> <q-icon name="access_time" class="cursor-pointer"> <q-popup-proxy ref="qTimeProxy" transition-show="scale" transition-hide="scale"> <q-time v-model="todo.dueDate" mask="YYYY/MM/DD HH:mm" format24h @input="() => $refs.qTimeProxy.hide()" /> </q-popup-proxy> </q-icon> </template> </q-input>