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

DatePicker 1.4.4 disabledDate fixes are not complete (fix provided) #6941

Closed
remzmike opened this issue Sep 8, 2017 · 5 comments
Closed

Comments

@remzmike
Copy link

remzmike commented Sep 8, 2017

Element UI version

0.1.0

OS/Browsers version

Windows 10, Firefox/Chrome

Vue version

2.3.4

Reproduction Link

https://gist.github.com/remzmike/41de4e999addc6be195ab9bcf86628fc

Steps to reproduce

https://gist.github.com/remzmike/41de4e999addc6be195ab9bcf86628fc

What is Expected?

DatePicker disabledDate works

What is actually happening?

It doesn't

@remzmike
Copy link
Author

remzmike commented Sep 8, 2017

DatePicker changes in 1.4.4 are not correct.

See my comments here:
#6768

Or just look at the fix:
https://gist.github.com/remzmike/41de4e999addc6be195ab9bcf86628fc
https://gist.github.com/remzmike/a06aaa7a8460b3c58f199b4bc68e9ef7

@remzmike remzmike changed the title DatePicker 1.4.4 disabledDate fixes are not complete DatePicker 1.4.4 disabledDate fixes are not complete (fix provided) Sep 8, 2017
@glittle
Copy link

glittle commented Sep 8, 2017

Also see this JSFiddle https://jsfiddle.net/kpnvgqcn/.

None of the days in this year can be selected, yet it looks like some can be used.

image

@Leopoldthecoder
Copy link
Contributor

@remzmike Could you write a demo of this bug?

@glittle I'm sorry but your demo works fine on my Chrome. Is there anything I need to do to reproduce this?

image

@remzmike
Copy link
Author

remzmike commented Sep 19, 2017

@Leopoldthecoder

Please read my comments here for the most complete details I have provided:
#6768

I don't have time to write a demo. I'm not the first person to report this and it was supposedly already fixed, but this simple code shows why the previous fix does not work and will never work.

d = new Date(0);
d.setFullYear(2017);
d.setMonth(8);
// > Sun Oct 01 2017 19:00:00 GMT-0400 (Eastern Daylight Time)
d.setMonth(8);
// > Fri Sep 01 2017 19:00:00 GMT-0400 (Eastern Daylight Time)

@Leopoldthecoder
Copy link
Contributor

This turns out to be an interesting bug. A bug that only exists in the west hemisphere. That's why I didn't reproduce it in the demo written by @glittle .

Fixed in #7114

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