I have this v-autocomplete
which receives an array of items to display from GrowthTasks.edges
<v-autocomplete label="Start Week"
:items="GrowthTasks.edges" item-text="node.growthStartDate" item-value="node.growthStartDate" dense></v-autocomplete>
The item-text
receives the text from there by acessing node.growthStartDate
, which is a date format like : "2020-05-06".
Now I want to turn it into a format like "2020-W19" , which I know is possible using moment("YYYY-[W]WW")
but I dont know how to tell this to item-text
.
Basically, I want the result on the item-text to be the same as if I was using :
{{ node.growthStartDate | moment("YYYY-[W]WW") }}
which works.
Any idea on how can do it ?
You can create computed property and return formated dates: