Answer the question
In order to leave comments, you need to log in
The date is displayed on ios NaN, and on other devices it is correct. Why and how to do it?
I use moment.js
On all devices except apple, the date is correct, but NaN comes on IOS
currentData() {
return moment(this.getCurrentDateRange.start).format('YYYY-MM-DD')
},
Answer the question
In order to leave comments, you need to log in
This.getCurrentDateRange.start contains a date in an incomprehensible IOS format. Specify a specific format explicitly:
currentDate() {
return moment(this.getCurrentDateRange.start, "YYYYMMDD(или какой там формат)").format('YYYY-MM-DD')
},
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question