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, '/'))

相关文章:

  • 2022-01-25
  • 2021-08-18
  • 2021-09-08
  • 2021-07-06
  • 2022-01-25
  • 2022-12-23
  • 2021-12-22
  • 2022-02-06
猜你喜欢
  • 2022-12-23
  • 2021-08-30
  • 2022-12-23
  • 2021-11-20
  • 2021-05-23
  • 2021-09-08
相关资源
相似解决方案