Open mvalitov opened 4 years ago
I am using it like this:
<VueRangedatePicker v-if="!reset"></VueRangedatePicker>
............................
............................
data(){
reset: false,
},
methods: {
submitForm(){
//form on submit success
this.reset = true;
setTimeout(()=>{ this.reset = false }, 100)
}
}
The idea here is rerendering the component
You could also reset the component date object directly, via $refs:
this.$refs.rangedatepicker.$data.dateRange = {};
Where 'rangedatepicker' is the ref attribute set on the component.
How to reset the currently selected date range?