Open itsjustbrian opened 7 years ago
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.
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.
However, one subsequent switch after that (from year -> to date -> back to year) produces the expected behavior like this:
You're right. I will try to fix it asap.
+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.
We've opened a new issue in paper-date-picker: https://github.com/bendavis78/paper-date-picker/issues/187
I wouldn't expect a quick fix, although. The activity on the issues in this repo is really low recently.
To be revised after paper-date-picker issue is fixed. @pitsevich your changes have been merged, new v1.0.13 available. Thanks.
Could be a paper-datepicker problem not an etools-datepicker problem, but definitely needs fix. Very annoying for UX