0

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
asked May 6, 2025 at 11:29
1
  • 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. Commented May 6, 2025 at 19:14

0

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.