Is it possible to include @imput or @select event #80
hugorodriguesbr
started this conversation in
General
Replies: 1 comment
-
I have got the same problem as you. I have found a workaround. Here is an example below: <script setup lang="ts">
const periodValue: Ref<{
startDate: string,
endDate: string
}> = ref({
startDate: '2023-04-25',
endDate: '2023-04-26'
});
const onDateRangeChanged = () => {
emit('update:modelValue', {
startDate: periodValue.value.startDate,
endDate: periodValue.value.endDate
});
};
watch(() => periodValue.value.startDate, onDateRangeChanged)
watch(() => periodValue.value.endDate, onDateRangeChanged)
</script>
<template>
<vue-tailwind-datepicker v-model="periodValue" />
</template> |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I would like to use the datepicker as a filter, emitting an event when selecting a date.
example:
<vue-tailwind-datepicker
i18n="pt-br"
placeholder="Data"
as-single use-range
separator=" Até "
:formatter="dateFormat"
:disable-date="dateDisable"
:options="dateoptions"
v-model="dateValue"
@imput="onSelectSomething"
/>
Beta Was this translation helpful? Give feedback.
All reactions