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

切换年份后,日历日期与星期匹配不正确 #7

Closed
brucekong opened this issue Feb 22, 2017 · 1 comment
Closed

切换年份后,日历日期与星期匹配不正确 #7

brucekong opened this issue Feb 22, 2017 · 1 comment

Comments

@brucekong
Copy link

brucekong commented Feb 22, 2017

当切换日历年份的时候,每月对应的日期和星期匹配不正确,比如切换到2016年12月1日时,匹配的星期为星期五(Fr),但其实应该是星期四(Th),看了源码发现是在298和299行 ----
298. let startDay = new Date(this.year, this.tmpMonth, 1).getDay()
299. let previousMongthLength = new Date(this.year, this.tmpMonth, 0).getDate()
获取当前选择的年份使用的是this.year ,修改为 this.tmpYear 即可。

showonne added a commit that referenced this issue Feb 22, 2017
showonne added a commit that referenced this issue Feb 22, 2017
@showonne
Copy link
Owner

多谢提醒,已修改。

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

2 participants