app-extension-qdatetimepicker
app-extension-qdatetimepicker copied to clipboard
[v2] Model not revalidated in displayValue mode
To reproduce:
- Insert a
QDateTimePicker
into aQForm
. - Set both the
displayValue
andrules
props, for example, like this, withdisplayValue
being a function of the model value:
<q-date-time-picker
label="Start date/time"
v-model="startDateTime"
:display-value="startDateTime"
mode="datetime"
:rules="[
(val) => !!val || 'This field is required.',
]"
/>
- Click the date/time picker field.
- Select a date/time and click Set.
- Observe that the "This field is required" validation error is not cleared upon setting the value.
As a workaround, I've added a watcher that hides the date/time picker and immediately shows it again upon value change, causing it to re-render and clear validation errors.
Reproduced with @toby.mosque/quasar-ui-qdatetimepicker
version 2.0.0-rc3.