{"action":"created","issue":{"url":"https://api.github.com/repos/ng-bootstrap/ng-bootstrap/issues/1903","repository_url":"https://api.github.com/repos/ng-bootstrap/ng-bootstrap","labels_url":"https://api.github.com/repos/ng-bootstrap/ng-bootstrap/issues/1903/labels{/name}","comments_url":"https://api.github.com/repos/ng-bootstrap/ng-bootstrap/issues/1903/comments","events_url":"https://api.github.com/repos/ng-bootstrap/ng-bootstrap/issues/1903/events","html_url":"https://github.com/ng-bootstrap/ng-bootstrap/issues/1903","id":266488753,"number":1903,"title":"can not assign null to **toDate**","user":{"login":"ibagaric","id":12593739,"avatar_url":"https://avatars3.githubusercontent.com/u/12593739?v=4","gravatar_id":"","url":"https://api.github.com/users/ibagaric","html_url":"https://github.com/ibagaric","followers_url":"https://api.github.com/users/ibagaric/followers","following_url":"https://api.github.com/users/ibagaric/following{/other_user}","gists_url":"https://api.github.com/users/ibagaric/gists{/gist_id}","starred_url":"https://api.github.com/users/ibagaric/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ibagaric/subscriptions","organizations_url":"https://api.github.com/users/ibagaric/orgs","repos_url":"https://api.github.com/users/ibagaric/repos","events_url":"https://api.github.com/users/ibagaric/events{/privacy}","received_events_url":"https://api.github.com/users/ibagaric/received_events","type":"User","site_admin":false},"labels":[{"id":263376143,"url":"https://api.github.com/repos/ng-bootstrap/ng-bootstrap/labels/component:%20datepicker","name":"component: datepicker","color":"ffffff","default":false},{"id":260891007,"url":"https://api.github.com/repos/ng-bootstrap/ng-bootstrap/labels/resolution:%20support","name":"resolution: support","color":"c7def8","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-10-18T13:15:51Z","updated_at":"2017-10-19T08:40:50Z","closed_at":"2017-10-19T08:40:50Z","author_association":"NONE","body":"In datepicker I can not assign null to **toDate** bacause toDate has type **NgbDateStruct**\r\n\r\n`export interface NgbDateStruct {\r\n    year: number;\r\n    month: number;\r\n    day: number;\r\n}`\r\n\r\nexample in date picker range:\r\n\r\n`    onDateChange(date: NgbDateStruct) {\r\n        if (!this.fromDate && !this.toDate) {\r\n            this.fromDate = date;\r\n        } else if (this.fromDate && !this.toDate && after(date, this.fromDate)) {\r\n            this.toDate = date;\r\n        } else {\r\n            this.toDate = null;\r\n            this.fromDate = date;\r\n        }\r\n    }`\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/ng-bootstrap/ng-bootstrap/issues/comments/337840015","html_url":"https://github.com/ng-bootstrap/ng-bootstrap/issues/1903#issuecomment-337840015","issue_url":"https://api.github.com/repos/ng-bootstrap/ng-bootstrap/issues/1903","id":337840015,"user":{"login":"maxokorokov","id":8074436,"avatar_url":"https://avatars0.githubusercontent.com/u/8074436?v=4","gravatar_id":"","url":"https://api.github.com/users/maxokorokov","html_url":"https://github.com/maxokorokov","followers_url":"https://api.github.com/users/maxokorokov/followers","following_url":"https://api.github.com/users/maxokorokov/following{/other_user}","gists_url":"https://api.github.com/users/maxokorokov/gists{/gist_id}","starred_url":"https://api.github.com/users/maxokorokov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxokorokov/subscriptions","organizations_url":"https://api.github.com/users/maxokorokov/orgs","repos_url":"https://api.github.com/users/maxokorokov/repos","events_url":"https://api.github.com/users/maxokorokov/events{/privacy}","received_events_url":"https://api.github.com/users/maxokorokov/received_events","type":"User","site_admin":false},"created_at":"2017-10-19T08:40:50Z","updated_at":"2017-10-19T08:40:50Z","author_association":"COLLABORATOR","body":"It looks like it has nothing to do with datepicker itself, but with the way you're trying to use it. Also you can perfectly fine do the following: `let date: NgbDateStruct = null;`, so I don't see any problem.\r\n\r\n- this is a support request and as such doesn't belong here: https://github.com/ng-bootstrap/ng-bootstrap/blob/master/README.md#getting-help\r\n- we can't help much without a reproduce scenario in a plunker.\r\n\r\nPlease try to reproduce your problem in a plunker and ask further questions on StackOverflow. Thnx!"}}
{"actor":{"display_login":"maxokorokov"}}