{"action":"created","issue":{"url":"https://api.github.com/repos/angular-ui/bootstrap/issues/4415","labels_url":"https://api.github.com/repos/angular-ui/bootstrap/issues/4415/labels{/name}","comments_url":"https://api.github.com/repos/angular-ui/bootstrap/issues/4415/comments","events_url":"https://api.github.com/repos/angular-ui/bootstrap/issues/4415/events","html_url":"https://github.com/angular-ui/bootstrap/issues/4415","id":106343416,"number":4415,"title":"DateParser fails when locale changes","user":{"login":"tobigun","id":116718,"avatar_url":"https://avatars.githubusercontent.com/u/116718?v=3","gravatar_id":"","url":"https://api.github.com/users/tobigun","html_url":"https://github.com/tobigun","followers_url":"https://api.github.com/users/tobigun/followers","following_url":"https://api.github.com/users/tobigun/following{/other_user}","gists_url":"https://api.github.com/users/tobigun/gists{/gist_id}","starred_url":"https://api.github.com/users/tobigun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tobigun/subscriptions","organizations_url":"https://api.github.com/users/tobigun/orgs","repos_url":"https://api.github.com/users/tobigun/repos","events_url":"https://api.github.com/users/tobigun/events{/privacy}","received_events_url":"https://api.github.com/users/tobigun/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/angular-ui/bootstrap/labels/component:%20dateparser","name":"component: dateparser","color":"ffffff"},{"url":"https://api.github.com/repos/angular-ui/bootstrap/labels/type:%20enhancement","name":"type: enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/angular-ui/bootstrap/milestones/19","html_url":"https://github.com/angular-ui/bootstrap/milestones/0.14.0%20(Bootstrap%203.3)","labels_url":"https://api.github.com/repos/angular-ui/bootstrap/milestones/19/labels","id":1022385,"number":19,"title":"0.14.0 (Bootstrap 3.3)","description":"Full Bootstrap v3.3.2 compatibility","creator":{"login":"rvanbaalen","id":220637,"avatar_url":"https://avatars.githubusercontent.com/u/220637?v=3","gravatar_id":"","url":"https://api.github.com/users/rvanbaalen","html_url":"https://github.com/rvanbaalen","followers_url":"https://api.github.com/users/rvanbaalen/followers","following_url":"https://api.github.com/users/rvanbaalen/following{/other_user}","gists_url":"https://api.github.com/users/rvanbaalen/gists{/gist_id}","starred_url":"https://api.github.com/users/rvanbaalen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rvanbaalen/subscriptions","organizations_url":"https://api.github.com/users/rvanbaalen/orgs","repos_url":"https://api.github.com/users/rvanbaalen/repos","events_url":"https://api.github.com/users/rvanbaalen/events{/privacy}","received_events_url":"https://api.github.com/users/rvanbaalen/received_events","type":"User","site_admin":false},"open_issues":76,"closed_issues":55,"state":"open","created_at":"2015-03-15T21:55:14Z","updated_at":"2015-09-19T08:06:45Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2015-09-14T13:42:45Z","updated_at":"2015-09-19T08:06:45Z","closed_at":"2015-09-19T08:06:45Z","body":"The dateParser (ui.bootstrap.dateparser) caches previosuly used parsers in \"this.parsers\". A new parser is only created, if no parser exists for the current date format.\r\n\r\nThis is a problem if two locales use the same date format and the dateParser was previously used with another language (e.g. with the DatePicker). The parser for the previous locale (with wrong month names, ...) is used in this case instead of creating a new one.\r\n\r\nIn this case for example the datepicker will not be able to select a different date, as it cannot parse the date in the input field (as e.g. the month names of the current language are different than those of the previous language).\r\n\r\nA workaround is to reset dateParser.parsers manually whenever the locale changes:\r\n```javascript\r\ndateParser.parsers = {}\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/angular-ui/bootstrap/issues/comments/141634965","html_url":"https://github.com/angular-ui/bootstrap/issues/4415#issuecomment-141634965","issue_url":"https://api.github.com/repos/angular-ui/bootstrap/issues/4415","id":141634965,"user":{"login":"tobigun","id":116718,"avatar_url":"https://avatars.githubusercontent.com/u/116718?v=3","gravatar_id":"","url":"https://api.github.com/users/tobigun","html_url":"https://github.com/tobigun","followers_url":"https://api.github.com/users/tobigun/followers","following_url":"https://api.github.com/users/tobigun/following{/other_user}","gists_url":"https://api.github.com/users/tobigun/gists{/gist_id}","starred_url":"https://api.github.com/users/tobigun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tobigun/subscriptions","organizations_url":"https://api.github.com/users/tobigun/orgs","repos_url":"https://api.github.com/users/tobigun/repos","events_url":"https://api.github.com/users/tobigun/events{/privacy}","received_events_url":"https://api.github.com/users/tobigun/received_events","type":"User","site_admin":false},"created_at":"2015-09-19T08:06:45Z","updated_at":"2015-09-19T08:06:45Z","body":"The issue is fixed with the now merged pull-request #4425."}}