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

日期选择器在10/31号时无法选择11月的任何日期 #11

Open
yenche123 opened this issue Oct 31, 2019 · 0 comments
Open

日期选择器在10/31号时无法选择11月的任何日期 #11

yenche123 opened this issue Oct 31, 2019 · 0 comments

Comments

@yenche123
Copy link

使用sc-date-picker 也就是今天(2019/10/31 UTC+8) 无法选择11月的日期,准确来说选择11月的任一日期会显示12月,非常的奇怪。细看了源码可能是day.js出了问题,我已经定位到 _MonthDay: function(t) {} 函数里,在该函数里生成a这个array时,有这么两句
var l = dayjs(); l = l.set("year", n).set("month", i).set("date", c)

n是2019 i是10 (也就代表着11月),都是符合预期的,但是l就是错误的了,出来的结果l 为 {$m: 11, ...},$m明显是错的,跑到12月去了。

微信图片_20191031150253

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

1 participant