After I call clearDate() on an instance or set the v-model variable to null and then select a new date within a calendar, v-model variable is no longer updating.
Only if I set the v-model variable back to a date object it starts updating again.
I tried to locate the issue, but I'm having trouble finding it. Could you look into it?
let testDate = ref(new Date());
let inputDate = ref(null); // ref to Datepicker component
inputDate.value.clearDate();
// or
testDate.value = null;
<Datepicker ref="inputDate" v-model="testDate" />
Stops working.
Only after i set testDate.value = new Date(); it start updating the testDate again.
I solved it with capturing selectedDate event and setting the v-model variable with event payload, but it's a dirty hack.
After I call clearDate() on an instance or set the v-model variable to null and then select a new date within a calendar, v-model variable is no longer updating. Only if I set the v-model variable back to a date object it starts updating again.
I tried to locate the issue, but I'm having trouble finding it. Could you look into it?
Stops working.
Only after i set
testDate.value = new Date();
it start updating thetestDate
again.I solved it with capturing
selectedDate
event and setting the v-model variable with event payload, but it's a dirty hack.