{"action":"created","issue":{"url":"https://api.github.com/repos/fragaria/angular-daterangepicker/issues/67","labels_url":"https://api.github.com/repos/fragaria/angular-daterangepicker/issues/67/labels{/name}","comments_url":"https://api.github.com/repos/fragaria/angular-daterangepicker/issues/67/comments","events_url":"https://api.github.com/repos/fragaria/angular-daterangepicker/issues/67/events","html_url":"https://github.com/fragaria/angular-daterangepicker/issues/67","id":84547157,"number":67,"title":"Setting initial date to null causes 'Invalid date'","user":{"login":"petarslovic","id":5387195,"avatar_url":"https://avatars.githubusercontent.com/u/5387195?v=3","gravatar_id":"","url":"https://api.github.com/users/petarslovic","html_url":"https://github.com/petarslovic","followers_url":"https://api.github.com/users/petarslovic/followers","following_url":"https://api.github.com/users/petarslovic/following{/other_user}","gists_url":"https://api.github.com/users/petarslovic/gists{/gist_id}","starred_url":"https://api.github.com/users/petarslovic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petarslovic/subscriptions","organizations_url":"https://api.github.com/users/petarslovic/orgs","repos_url":"https://api.github.com/users/petarslovic/repos","events_url":"https://api.github.com/users/petarslovic/events{/privacy}","received_events_url":"https://api.github.com/users/petarslovic/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-03T12:50:31Z","updated_at":"2015-06-06T17:29:57Z","closed_at":null,"body":"Hello, this happens on master, but not on `0.1.14`\r\nWhen trying to initialize it to be empty, like so:\r\n```\r\n$scope.request.date = {\r\n    startDate: null,\r\n    endDate: null\r\n  }\r\n```\r\n```\r\n<input date-range-picker placeholder=\"MM/DD/YYYY\" class=\"input-sm form-control date-picker\" type=\"text\" ng-model=\"request.date\" />\r\n```\r\n\r\nIt shows 'Invalid date to Invalid date'\r\n![image](https://cloud.githubusercontent.com/assets/5387195/7960288/b792bf6a-09ff-11e5-96ec-5a3cef73dda6.png)\r\n\r\nThis has something to do with trying to make a `moment` right away with those initial null values, which then produces invalid date."},"comment":{"url":"https://api.github.com/repos/fragaria/angular-daterangepicker/issues/comments/109620865","html_url":"https://github.com/fragaria/angular-daterangepicker/issues/67#issuecomment-109620865","issue_url":"https://api.github.com/repos/fragaria/angular-daterangepicker/issues/67","id":109620865,"user":{"login":"btmdave","id":28645,"avatar_url":"https://avatars.githubusercontent.com/u/28645?v=3","gravatar_id":"","url":"https://api.github.com/users/btmdave","html_url":"https://github.com/btmdave","followers_url":"https://api.github.com/users/btmdave/followers","following_url":"https://api.github.com/users/btmdave/following{/other_user}","gists_url":"https://api.github.com/users/btmdave/gists{/gist_id}","starred_url":"https://api.github.com/users/btmdave/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/btmdave/subscriptions","organizations_url":"https://api.github.com/users/btmdave/orgs","repos_url":"https://api.github.com/users/btmdave/repos","events_url":"https://api.github.com/users/btmdave/events{/privacy}","received_events_url":"https://api.github.com/users/btmdave/received_events","type":"User","site_admin":false},"created_at":"2015-06-06T17:29:57Z","updated_at":"2015-06-06T17:29:57Z","body":"I'm experiencing the same issue.  Specifically, after a date has been selected, if you attempt to clear it or reset the model, it shows the Invalid date.  Here's a screenshot after attempting to update the model with both `startDate` and `endDate` null.\r\n\r\n![screen shot 2015-06-06 at 1 21 55 pm](https://cloud.githubusercontent.com/assets/28645/8020674/f798a12c-0c4f-11e5-8bc7-0534105e5965.png)\r\n"}}