0👍
this is because firestore use is own date format. Or you can try to use:
new Date().getTime()
But I suggest you to use the firestore Timestamp
0👍
the new Date()
constructor doesn’t return a string in your case
you can do it this way :
mounted(){
var date = new Date();
database.once('value', pages =>{
pages.forEach(page => {
this.pages.push({
...
datetime : date.toJSON();
})
}
}
}
- [Vuejs]-How to fix error " [vuex] expects string as the type, but found object" on Firebase err promise
- [Vuejs]-VueJS Transition depending on whether a link is behind or before the current link in navbar
Source:stackexchange.com