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

3.0.8设置默认日期报错 #31

Open
Hdj2048228 opened this issue Sep 11, 2018 · 4 comments
Open

3.0.8设置默认日期报错 #31

Hdj2048228 opened this issue Sep 11, 2018 · 4 comments

Comments

@Hdj2048228
Copy link

设置默认日期时报错,且选不了年份
8638e33141f39df72b1f2129f5b536d
053270f95575194d682bdb9484a2f29
73042065b040bcbb4928426bb682398

this.$picker.show({
type:'datePicker',
date: '2018-02-02', // 2018-02-02 初始化时间
endTime:'2018-09-08', //截至时间
// startTime:'2018-06-09', //开始时间
onOk:(e)=>{
this.date2 = e;
},

@Hdj2048228
Copy link
Author

看了一下,应该是没有设置startTime引起的,代码里是这样的

const start = (new Date(getDate(settings.startTime)|| '1950-01-01').getTime());

改为这样岂不更好?

const start = (new Date(getDate(settings.startTime || '1950-01-01')).getTime());

@jamielhf
Copy link
Owner

@Hdj2048228 嗯,我修改下,谢谢提醒

@Hdj2048228
Copy link
Author

不客气,应该是我感谢你,我最近在用你这个日期选择器,我fork一下,有问题我就自己改了,提交request,你有空就看看吧。开源万岁。

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

3 participants
@jamielhf @Hdj2048228 and others