0👍
Are you sure you use "some" method in the right way? Your computed value is called "datesBiggerOrCurrentDate" and in a template you try to compare it to a currentDate, but this computed value is a boolean not a date because "some" method returns boolean value.
You can read about the "some" method here Array.prototype.some()
Instead using of "some" method you should use "filter" method and compare dates by built-in momentjs method – "isSameOrAfter"
Your computed value should be something like this:
datesBiggerOrCurrentDate() {
return this.listOfDates.filter(date => moment(date).isSameOrAfter(this.currentDate));
},
You can try it on codepen – https://codepen.io/AlekseiKrivo/pen/vYVWzzr
- [Vuejs]-How to properly log out in Nuxt 3 / Vue JS?
- [Vuejs]-Issues loading Vue defineComponent()s in Nuxt | Could not load vue.esm-bundler\server-renderer
Source:stackexchange.com