I'm trying to format a date from 'YYYY/MM/DD' to 'DD/MM/YYYY' in a v-date-table using a template
<template v-slot:[`item.project_target_date`]="{ item }">
{{ item.project_target_date }}
</template>
If I import and use MOMENT ("^2.30.1")
{{ item.project_target_date | moment("DD/MM/YYYY") }}
I get an error in the console:
TypeError: _ctx.moment is not a function
or
{{ useDate().format('item.project_target_date', 'DD/MM/YYYY') }}
Uncaught (in promise) TypeError: _ctx.useDate is not a function
marc_s
760k186 gold badges1.4k silver badges1.5k bronze badges
-
What are the versions for relevant libraries being used here (vuetify, vue, moment)? "if I import and use MOMENT", please don't say you do something show it! How exactly are you importing? Also, in Vue 3 filters are no longer supported, you should really be using computed or function instead.yoduh– yoduh2025年05月06日 19:14:45 +00:00Commented May 6, 2025 at 19:14