litepie-datepicker
litepie-datepicker copied to clipboard
Events
Hi, I am using this plugin in order to select a date and a range, but I need to get when use select a date (or range) and when It clicks on apply and cancel button. Is this possible?
Thanks.
do you mean props auto-apply
?
Hi, I mean, if there is a way than this component emit an event when user select a date or when clicks on Apply or Cancel Button.
Ej: @click="$emit('select', $event)"
Thanks.
Indeed, I mean, that is mostly the point to use a datepicker. Yes, I get the dates in my component, but I need to the dates to its parent component.
I have the same need, has anyone found a solution?
Hi,
Maybe you want use this way.
import { ref, watch } from "vue";
const dateValue = ref([]);
watch(
dateValue,
(val) => {
console.log(val);
},
{ deep: true }
);
I believe this is what you are looking for
<litepie-datepicker @update:modelValue="$emit('select', $event)"