Skip to content

Commit

Permalink
fix: only emit strings on update DateInput
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanvanherwijnen committed Dec 7, 2023
1 parent 84b6618 commit 4e7be99
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/components/src/ui/form/DateInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
:placeholder="lang.datePicker.placeholder"
mask="date"
class="q-pr-md"
@update:model-value="$emit('update:modelValue', $event)"
@update:model-value="update"
>
<template v-slot:append>

Check warning on line 12 in packages/components/src/ui/form/DateInput.vue

View workflow job for this annotation

GitHub Actions / Lint

Expected '#append' instead of 'v-slot:append'

Check warning on line 12 in packages/components/src/ui/form/DateInput.vue

View workflow job for this annotation

GitHub Actions / Release

Expected '#append' instead of 'v-slot:append'
<q-icon
Expand Down Expand Up @@ -66,6 +66,9 @@ watch($q.lang, () => {
const { modelValue } = toRefs(props)
const update = (val: string | number | null) => {
if (typeof val === 'string') emit('update:modelValue', val)
}
watch(
() => modelValue?.value,
(newVal) => {
Expand Down

0 comments on commit 4e7be99

Please sign in to comment.