-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Investigate allowing dynamic date classes for the datepicker #4626
Comments
This would be really nice! I'm implementing a daterange-picker with two connected date-pickers and want to show the range of selected dates with a different background. When one of the dates changes, my custom-class function is called for every day but nothing happens. I don't want to have to watch for changes and manually switch months back and forth, which seems to be the only thing that helps right now. |
+1 |
Please do not +1, all it does is add noise |
What is the current recommended work-around for this issue? |
One can currently override the template and remove the one-way bindings if one wants to prevent this behavior, but I would recommend against doing so due to the 2x performance regression, and the massive hit on performance with each $digest cycle. |
+1 - ish. |
@ReToCode - in that case, you can still do a partial version of @wesleycho's solution in the interim. |
I have an idea for this - it will take a bit of work, but it should do the job. A new helper directive pair needs to be written for this where one directive orchestrates class updating and another directive registers the element & model object (in this case the |
Hi, Small example, template:
Controller:
|
A performant solution is needed for allowing dynamic date class toggling without running excessive watchers.
Noting from prior investigations, removing the one-time binding in the templates is not an option due to major performance issues. This will likely involve writing a new directive and/or parsing mechanism.
The text was updated successfully, but these errors were encountered: