-
Notifications
You must be signed in to change notification settings - Fork 83
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
[date-picker] Allow customizing individual date cells #1925
Comments
Thanks for the feature request! This is a feature that we’ve had in the backlog from the beginning, just haven’t had time to implement it yet (listed as “Allow customizing the date cells” in vaadin/vaadin-date-picker#30). So the generic feature is to allow the developer to control the “template” of the date cells, similar to the “custom item template” feature in vaadin-combo-box (https://github.com/vaadin/vaadin-combo-box/releases/tag/v1.3.0). |
Is there any other method so that I can implement this feature locally till it's implemented? |
I can’t think of a workaround at the moment, unfortunately, other than forking and implementing it yourself :( |
@tomivirkki, do you have any ideas? |
Here’s a super hacky workaround :) Note that
|
Polymer 1.x transforms both Maybe iterating over DOM nodes from outside would be a solution. I use |
I guess the aria-label hack could work when used together with the new ThemableMixin feature in 2.0. |
This feature was implemented in |
When this is implemented, we could also consider tooltip support for providing additional information on what various date cell styles mean, and e.g. why a certain date is disabled. |
In this particular use case, the disabled dates should still be accessible with the keyboard, to make the tooltip accessible. Or that’s what I assume, that it would not be okay for screen reader users to not be able to focus the disabled dates, to learn why they are disabled. Or can we assume that a screen reader focus/cursor is different from regular keyboard focus, and a date cell which is not focusable via the arrow key navigation in the month calendar could still be accessed with a screen reader cursor? |
Description
If for some date, the service may not available then we should show the date with different background-color like red only for that particular date.If available then the date should be in green. so we can give a better information through the date picker.
Expected outcome
changing color for some dates
Actual outcome
not implemented yet.we can only disable date now
Live Demo
Steps to reproduce
Browsers Affected
The text was updated successfully, but these errors were encountered: