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

Year picker sometimes defaults to earliest year instead of current year #5

Open
itsjustbrian opened this issue Nov 21, 2016 · 6 comments

Comments

@itsjustbrian
Copy link
Collaborator

Could be a paper-datepicker problem not an etools-datepicker problem, but definitely needs fix. Very annoying for UX

@adi130987
Copy link
Collaborator

I noticed and solve this issue yesterday when I made the changes for clear date button. Now if you you do not set a default date for the date picker or the date object you used to init the date is null or undefined or 'Invalid Date' it will default current day. I made a test again and it's not reproducing anymore. If it does please provide a test case.

@itsjustbrian
Copy link
Collaborator Author

I should have been more clear with this issue. This refers specifically to the year selector within the date-picker. You can see in the screenshot, it defaults to the current date, but clicking on the year picker takes you to the first year / the top of the scroll window.

image

However, one subsequent switch after that (from year -> to date -> back to year) produces the expected behavior like this:

image

@adi130987
Copy link
Collaborator

You're right. I will try to fix it asap.

@gpg90
Copy link

gpg90 commented Jun 22, 2017

+1
We've also noticed this problem.

It looks like the problem comes not from etools-datepicker directly, but happens in paper-year-list element inside paper-date-picker. It uses iron-list to render elements.

When the "centerSelected" method is called for the first time, the template might be not rendered yet.
That could be the reason why the method doesn't work as it should — and year is not placed to the center.

@gpg90
Copy link

gpg90 commented Jun 23, 2017

We've opened a new issue in paper-date-picker: bendavis78/paper-date-picker#187

I wouldn't expect a quick fix, although. The activity on the issues in this repo is really low recently.

@adi130987
Copy link
Collaborator

To be revised after paper-date-picker issue is fixed.
@pitsevich your changes have been merged, new v1.0.13 available. Thanks.

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