mobileTech icon indicating copy to clipboard operation
mobileTech copied to clipboard

iphone中new Date('2016-09-01 19:00:00')错误

Open jsoncode opened this issue 8 years ago • 6 comments

iphone中new Date('2016-09-01 19:00:00')会报Invalid Date错误, 必须写成new Date('2016/09/01 19:00:00'),

jsoncode avatar Aug 23 '16 07:08 jsoncode

谢谢!我把他补充进去

jtyjty99999 avatar Aug 23 '16 08:08 jtyjty99999

这个格式,pc下ie也是不行的,一般都是 yyyy/MM/dd 格式,横线格式要避开

shellphon avatar Aug 23 '16 10:08 shellphon

严格说是:ie<=8的时候,会报[date] NaN错误

jsoncode avatar Aug 24 '16 02:08 jsoncode

ios中如下代码无效: dom.style="width:100px;height:100px;" 必须写成: dom.style.width=100+"px"; dom.style.height=100+"px";

window,和移动端判断横竖屏问题: var angle = 0; try { angle = window.screen.orientation.angle } catch (e) { angle =window.orientation } Math.abs(angle) === 90//横屏

jsoncode avatar Sep 02 '16 05:09 jsoncode

iphone中new Date('2016-09-01 19:00:00') 这个问题是不是可以直接归纳为Date.prase()方法的浏览器兼容性问题?

liveKang avatar Sep 02 '16 05:09 liveKang

必须写成new Date('2016/09/01 19:00:00')

Thinking80s avatar May 23 '17 10:05 Thinking80s