{"action":"created","issue":{"url":"https://api.github.com/repos/angular-ui/bootstrap/issues/4324","labels_url":"https://api.github.com/repos/angular-ui/bootstrap/issues/4324/labels{/name}","comments_url":"https://api.github.com/repos/angular-ui/bootstrap/issues/4324/comments","events_url":"https://api.github.com/repos/angular-ui/bootstrap/issues/4324/events","html_url":"https://github.com/angular-ui/bootstrap/issues/4324","id":104356156,"number":4324,"title":"Validation of datepicker popup input not recognizing ISO as valid input","user":{"login":"immertreu","id":3056911,"avatar_url":"https://avatars.githubusercontent.com/u/3056911?v=3","gravatar_id":"","url":"https://api.github.com/users/immertreu","html_url":"https://github.com/immertreu","followers_url":"https://api.github.com/users/immertreu/followers","following_url":"https://api.github.com/users/immertreu/following{/other_user}","gists_url":"https://api.github.com/users/immertreu/gists{/gist_id}","starred_url":"https://api.github.com/users/immertreu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/immertreu/subscriptions","organizations_url":"https://api.github.com/users/immertreu/orgs","repos_url":"https://api.github.com/users/immertreu/repos","events_url":"https://api.github.com/users/immertreu/events{/privacy}","received_events_url":"https://api.github.com/users/immertreu/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-09-01T21:14:54Z","updated_at":"2015-09-04T16:34:17Z","closed_at":"2015-09-01T22:21:32Z","body":"I have a date field that can be modified by the datepicker popup or by another date range selector. This date range selector will provide dates as ISO strings. As of angular bootstrap 0.13.3 the date validator will find these dates invalid. \r\n\r\nFor example if I have the following in my html:\r\n```\r\n<input type=\"text\" ng-model=\"start_time\" datepicker-popup=\"{{format}}\" datepicker-options=\"dateOptions\" name=\"startTime\"/>\r\n\r\n```\r\nAnd I initialize $scope.start_time to '2015-08-01T00:00:00-05:00'. This will set startTme.$invalid to true"},"comment":{"url":"https://api.github.com/repos/angular-ui/bootstrap/issues/comments/137784700","html_url":"https://github.com/angular-ui/bootstrap/issues/4324#issuecomment-137784700","issue_url":"https://api.github.com/repos/angular-ui/bootstrap/issues/4324","id":137784700,"user":{"login":"wesleycho","id":1703387,"avatar_url":"https://avatars.githubusercontent.com/u/1703387?v=3","gravatar_id":"","url":"https://api.github.com/users/wesleycho","html_url":"https://github.com/wesleycho","followers_url":"https://api.github.com/users/wesleycho/followers","following_url":"https://api.github.com/users/wesleycho/following{/other_user}","gists_url":"https://api.github.com/users/wesleycho/gists{/gist_id}","starred_url":"https://api.github.com/users/wesleycho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wesleycho/subscriptions","organizations_url":"https://api.github.com/users/wesleycho/orgs","repos_url":"https://api.github.com/users/wesleycho/repos","events_url":"https://api.github.com/users/wesleycho/events{/privacy}","received_events_url":"https://api.github.com/users/wesleycho/received_events","type":"User","site_admin":false},"created_at":"2015-09-04T16:34:17Z","updated_at":"2015-09-04T16:34:17Z","body":"The string fallback caused lots of issues though - for example, strings turns out to have different validity depending on what formats the Date constructor supports in different browsers. There is no reliable way to unify the behavior, or make it make sense consistently in any fashion.\r\n\r\nIt also caused bugs with the validation itself.\r\n\r\nThe workaround is to have an intermediary layer convert the string to the date object manually before setting - this is a best practice in general."}}