Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jsoncode opened this issue Aug 23, 2016 · 6 comments
Open

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

jsoncode opened this issue Aug 23, 2016 · 6 comments

Comments

@jsoncode
Copy link

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

@jtyjty99999
Copy link
Owner

谢谢!我把他补充进去

@shellphon
Copy link

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

@jsoncode
Copy link
Author

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

@jsoncode
Copy link
Author

jsoncode commented Sep 2, 2016

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//横屏

@liveKang
Copy link

liveKang commented Sep 2, 2016

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

@Thinking80s
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants