I am utilizing the v-calendar plugin in my Vuejs project to incorporate a daterange picker. The rendering is working as expected and I can select dates successfully. However, I am struggling with logging out the selected dates for future use such as storing them in a database or updating a form. Unfortunately, the documentation does not provide any examples on how to achieve this.
Can anyone guide me on how to retrieve the start and end dates of a selected date range?
Below is a snippet of what I have implemented so far...
<template>
<v-date-picker mode='range' v-model='range' is-inline :columns="$screens({ default: 1, lg: 2 })" />
</template>
<script>
import { DatePicker } from 'v-calendar'
export default {
name: 'Booking',
components: {
DatePicker
},
data() {
return {
range: {
start: new Date(),
end: null
}
}
},
mounted() {
this.$root.$on('input', (value) => {
console.log('dxggdfg');
});
}
}
</script>