Open Benoit1980 opened 4 years ago
Hello,
I am using Laravel with vue.js
I added this to the app.js: import Moment from 'vue-moment'; Vue.use(Moment);
In my components it works when I used vue moment like this:
{{item.last_login | moment("DD-MM-YYYY HH:mm") }}
But as soon as I try to use it in an axis request it fails. I tried this:
formData.append('calendar', moment(String(this.field.calendar)).format('YYYY-MM-DD hh:mm'));
Also tried this:
formData.append('calendar', $moment(String(this.field.calendar)).format('YYYY-MM-DD hh:mm'));
Both of them shows this error:
[Vue warn]: Error in v-on handler: "ReferenceError: $moment is not defined" found in <AddGamesComponent> at resources/js/components/Listings/AddGamesComponent.vue <Root>
Any idea why please?
Thank you.
Try this.$moment
this.$moment
Hello,
I am using Laravel with vue.js
I added this to the app.js: import Moment from 'vue-moment'; Vue.use(Moment);
In my components it works when I used vue moment like this:
But as soon as I try to use it in an axis request it fails. I tried this:
Also tried this:
Both of them shows this error:
Any idea why please?
Thank you.