{"action":"created","issue":{"url":"https://api.github.com/repos/ng-bootstrap/ng-bootstrap/issues/1325","repository_url":"https://api.github.com/repos/ng-bootstrap/ng-bootstrap","labels_url":"https://api.github.com/repos/ng-bootstrap/ng-bootstrap/issues/1325/labels{/name}","comments_url":"https://api.github.com/repos/ng-bootstrap/ng-bootstrap/issues/1325/comments","events_url":"https://api.github.com/repos/ng-bootstrap/ng-bootstrap/issues/1325/events","html_url":"https://github.com/ng-bootstrap/ng-bootstrap/issues/1325","id":208818998,"node_id":"MDU6SXNzdWUyMDg4MTg5OTg=","number":1325,"title":"Run MarkDisabled function manually","user":{"login":"masaanli","id":10323857,"node_id":"MDQ6VXNlcjEwMzIzODU3","avatar_url":"https://avatars1.githubusercontent.com/u/10323857?v=4","gravatar_id":"","url":"https://api.github.com/users/masaanli","html_url":"https://github.com/masaanli","followers_url":"https://api.github.com/users/masaanli/followers","following_url":"https://api.github.com/users/masaanli/following{/other_user}","gists_url":"https://api.github.com/users/masaanli/gists{/gist_id}","starred_url":"https://api.github.com/users/masaanli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/masaanli/subscriptions","organizations_url":"https://api.github.com/users/masaanli/orgs","repos_url":"https://api.github.com/users/masaanli/repos","events_url":"https://api.github.com/users/masaanli/events{/privacy}","received_events_url":"https://api.github.com/users/masaanli/received_events","type":"User","site_admin":false},"labels":[{"id":263376143,"node_id":"MDU6TGFiZWwyNjMzNzYxNDM=","url":"https://api.github.com/repos/ng-bootstrap/ng-bootstrap/labels/component:%20datepicker","name":"component: datepicker","color":"ffffff","default":false},{"id":260885728,"node_id":"MDU6TGFiZWwyNjA4ODU3Mjg=","url":"https://api.github.com/repos/ng-bootstrap/ng-bootstrap/labels/type:%20feature","name":"type: feature","color":"84b6eb","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-02-20T09:01:13Z","updated_at":"2018-09-28T08:30:41Z","closed_at":null,"author_association":"NONE","body":"### Bug description:\r\nI don't know if this is a bug or not.\r\n \r\nNow 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.\r\n\r\nBut 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.\r\n\r\n \r\nAs a work arround iIdid the trick below! To Reinitialize the disabled days.\r\n```\r\n  private markDisabled() {\r\n    this.dpDate.navigateTo({\r\n      year: this.dpDate.months[0].year,\r\n      month: this.dpDate.months[0].number - 3\r\n    });\r\n\r\n    this.dpDate.navigateTo({\r\n      year: this.dpDate.months[0].year,\r\n      month: this.dpDate.months[0].number + 3\r\n    });\r\n  }\r\n```\r\n\r\nIdea to create a function to run the markDisabled again?\r\n\r\n### Link to minimally-working plunker that reproduces the issue:\r\n\r\nYou can fork a plunker from one of our [demos](https://ng-bootstrap.github.io/#/components) and use it as a starting point.\r\nPlease note that we can _not_ act on bug reports without a minimal reproduction scenario in plunker. Here is why:\r\nhttps://github.com/ng-bootstrap/ng-bootstrap#you-think-youve-found-a-bug\r\n\r\n### Version of Angular, ng-bootstrap, and Bootstrap:\r\n\r\nAngular: 2.3.5\r\n\r\nng-bootstrap:\r\n20\r\n\r\nBootstrap:\r\n6"},"comment":{"url":"https://api.github.com/repos/ng-bootstrap/ng-bootstrap/issues/comments/425362939","html_url":"https://github.com/ng-bootstrap/ng-bootstrap/issues/1325#issuecomment-425362939","issue_url":"https://api.github.com/repos/ng-bootstrap/ng-bootstrap/issues/1325","id":425362939,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNTM2MjkzOQ==","user":{"login":"timmyrosen","id":2311633,"node_id":"MDQ6VXNlcjIzMTE2MzM=","avatar_url":"https://avatars0.githubusercontent.com/u/2311633?v=4","gravatar_id":"","url":"https://api.github.com/users/timmyrosen","html_url":"https://github.com/timmyrosen","followers_url":"https://api.github.com/users/timmyrosen/followers","following_url":"https://api.github.com/users/timmyrosen/following{/other_user}","gists_url":"https://api.github.com/users/timmyrosen/gists{/gist_id}","starred_url":"https://api.github.com/users/timmyrosen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timmyrosen/subscriptions","organizations_url":"https://api.github.com/users/timmyrosen/orgs","repos_url":"https://api.github.com/users/timmyrosen/repos","events_url":"https://api.github.com/users/timmyrosen/events{/privacy}","received_events_url":"https://api.github.com/users/timmyrosen/received_events","type":"User","site_admin":false},"created_at":"2018-09-28T08:30:41Z","updated_at":"2018-09-28T08:30:41Z","author_association":"NONE","body":"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?"}}
{"actor":{"display_login":"timmyrosen"}}