Looking at vue2-daterange-picker examples at
https://innologica.github.io/vue2-daterange-picker/#usage
I wonder how it is implemented with Clear button?
I need to make such button and empty values as default values (not 1 Jan 1970).
Looking at vue2-daterange-picker examples at
https://innologica.github.io/vue2-daterange-picker/#usage
I wonder how it is implemented with Clear button?
I need to make such button and empty values as default values (not 1 Jan 1970).
This worked for me:
Your button needs to update the dateRange object or rather 'reset' it to the default in this case.
Button
<button class="btn btn-info" @click="clearDate()" type="button"> Clear </button>
Methods
methods:{
clearDate() {
this.dateRange.startDate = null;
this.dateRange.endDate = null;
},
}
I am new to all this stuff, and I realise my response is some months after the question, but I hope that it helps.