binggle
61
2
Vue

Momentjs format not works properly in Vuejs

Posted 1 week ago by binggle

hi .

I got json Data from Laravel server

when I display without moment js, it looks fine with correct data .

But with momentjs format it display all wrong data .

check parts of my code.

The followings are working correct as written

@{{ event['event_time'] }}

it displays

2019-08-14 12:00:00 2019-08-14 13:10:00 2019-08-14 14:20:00 2019-08-14 15:30:00 ; ;

But with moment

@{{ moment( event['event_time'], "YYYY-MM-DD HH:mm:ss" ).format( "MM-DD HH:mm" ) }}

08-14 14:03 08-14 14:03 08-14 14:03 08-14 14:03 08-14 14:03 ; ;

it display same and incorrect data

What is wrong with my code ?

Please sign in or create an account to participate in this conversation.