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

remove "padding days" hack #105

Open
Zecat opened this issue Apr 18, 2016 · 2 comments
Open

remove "padding days" hack #105

Zecat opened this issue Apr 18, 2016 · 2 comments

Comments

@Zecat
Copy link
Contributor

Zecat commented Apr 18, 2016

Assuming days are in a container with --layout-wrap according to #104, the "empty days" can be avoid by adding to months a field "firstDay" you get here https://github.com/bendavis78/paper-date-picker/blob/master/paper-calendar.html#L339, and put before the dom-repeat of days:

<div style$="width: calc(14.285% * [[month.firstDay]])"></div>

100 / 7 ~= 14.285
It will shift the first day at the right place.

@bendavis78
Copy link
Owner

Does the current method of padding days cause any issues, performance or otherwise?

@Zecat
Copy link
Contributor Author

Zecat commented Jun 11, 2016

It will lighten '_month' array and so avoid some dom-repeat iterations to finally lighten the dom a little bit, and it makes more sense that theses days does not exist rather than make them disabled, just an improvement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants