new Date (' 2017-12-12 12:01:00') 在ios 下会返回 NaN ' 2017-12-12 12:01:00.000' 时间格式也会返回NaN
要将- 转化为/
new Date(' 2017-12-12 12:01:00'.replace(/\-/g, '/'))
new Date(' 2017-12-12 12:01:00.000'.split('.')[0].replace(/\-/g, '/'))
new Date (' 2017-12-12 12:01:00') 在ios 下会返回 NaN ' 2017-12-12 12:01:00.000' 时间格式也会返回NaN
要将- 转化为/
new Date(' 2017-12-12 12:01:00'.replace(/\-/g, '/'))
new Date(' 2017-12-12 12:01:00.000'.split('.')[0].replace(/\-/g, '/'))
转载于:https://www.cnblogs.com/yangbaiwan/p/9935121.html