-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Run MarkDisabled function manually #1325
Comments
Hey @masaanli I'm aware of the issue. But I really don't want to create a Trying different solutions, but would be really interested to have some details on your use case. Am I right that for you re-running |
@maxokorokov true it is enough for now, but performance wise not good offcourse :) |
I agree this is much required function. To be able to enable/disable days as you please is essential in many cases, including mine. When creating a date range for example, some days can be selected from but not to, and vice versa. Has anyone managed to create a solution for this? |
@timmyrosen, a workaround might be to provide a new instance of the Here is the stackblitz: https://stackblitz.com/edit/angular-li9grd |
This works when u set I think it's better to allow call markDisabled function manually. Or, can just make |
Bug description:
I don't know if this is a bug or not.
Now when a month in a datepicker is rendered the [markDisabled]. So when you have 3 months which you display, you have 90~ days. 90 times the markDisabled is fired and this is OK.
But now when I select a date for example (in an already rendered datepicker) I want to disable some dates again. My first thought was that I can run a function on the datepicker #template like setDisabledOnDays, but there is not a kind of function like that.
As a work arround iIdid the trick below! To Reinitialize the disabled days.
Idea to create a function to run the markDisabled again?
Link to minimally-working plunker that reproduces the issue:
You can fork a plunker from one of our demos and use it as a starting point.
Please note that we can not act on bug reports without a minimal reproduction scenario in plunker. Here is why:
https://github.com/ng-bootstrap/ng-bootstrap#you-think-youve-found-a-bug
Version of Angular, ng-bootstrap, and Bootstrap:
Angular: 2.3.5
ng-bootstrap:
20
Bootstrap:
6
The text was updated successfully, but these errors were encountered: