0👍
One approach is to listen to change
event in v-date-picker
so in this case I created a function call filterDate
in order to listen to the change
<v-date-picker
v-model="date"
@change="filterDate"
>
<v-data-table
:headers="headers"
:items="rows"
>
// In data defines a variable dates
date: undefined
// In method
filterDate() {
if (this.date !== undefined) {
this.rows = this.copyOfRows.filter((item) => item.birthday == this.date)
}
}
In my case I stored the original data that will be in v-data-table
in vuex, so that when we filter items, the data is still there.
You might have to find a way to compare the date.
Hope this helps (:
Source:stackexchange.com