Currently, I am utilizing the vue-hotel-datepicker
component for managing dates. It is functioning well; however, I am encountering an issue when attempting to retrieve the updated date value in my JavaScript code. Any advice or assistance on how to capture the date object in JS would be greatly appreciated.
Check out this link for more information.
Below you can find a snippet of my code:
VUE
<DatePicker DatePickerID="DatePickerID3"
:disabledDaysOfWeek="['Monday']"
:value="date" placeholder="RentalDays"
:hoveringTooltip="false"
:endDate="new Date(2017, 9, 5)" />
JS
<script>
import Datepicker from 'vuejs-datepicker';
import HotelDatePicker from 'vue-hotel-datepicker'
export default {
data() {
return {
// date: new Date(2016, 9, 16)
date: '',
cdate: "",
RentalDays: "Rent-in ► Rent-out",
startdate:""
}
},
created () {
console.log("DATE",this.date);
},
components: {
'DatePicker': HotelDatePicker,
},
methods: {
getDate(date) {
console.log("current date", date);
}
},
watch: {
value: function () {
console.log("DATE Value");
}
}
}
</script>