{"action":"created","issue":{"url":"https://api.github.com/repos/720kb/angular-datepicker/issues/171","repository_url":"https://api.github.com/repos/720kb/angular-datepicker","labels_url":"https://api.github.com/repos/720kb/angular-datepicker/issues/171/labels{/name}","comments_url":"https://api.github.com/repos/720kb/angular-datepicker/issues/171/comments","events_url":"https://api.github.com/repos/720kb/angular-datepicker/issues/171/events","html_url":"https://github.com/720kb/angular-datepicker/issues/171","id":154728376,"number":171,"title":"date-set not working when using date-format","user":{"login":"pbouda","id":477192,"avatar_url":"https://avatars.githubusercontent.com/u/477192?v=3","gravatar_id":"","url":"https://api.github.com/users/pbouda","html_url":"https://github.com/pbouda","followers_url":"https://api.github.com/users/pbouda/followers","following_url":"https://api.github.com/users/pbouda/following{/other_user}","gists_url":"https://api.github.com/users/pbouda/gists{/gist_id}","starred_url":"https://api.github.com/users/pbouda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pbouda/subscriptions","organizations_url":"https://api.github.com/users/pbouda/orgs","repos_url":"https://api.github.com/users/pbouda/repos","events_url":"https://api.github.com/users/pbouda/events{/privacy}","received_events_url":"https://api.github.com/users/pbouda/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/720kb/angular-datepicker/labels/Any%20idea?","name":"Any idea?","color":"006b75"},{"url":"https://api.github.com/repos/720kb/angular-datepicker/labels/Waiting%20for%20infos","name":"Waiting for infos","color":"eb6420"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2016-05-13T14:44:09Z","updated_at":"2016-05-16T19:50:09Z","closed_at":null,"body":"I could not really get the `date-set` attribute working, when I set certain values in `date-format` (for example \"dd-MM-yyyy\"). I think the transformation of the date is wrong here:\r\n\r\nhttps://github.com/720kb/angular-datepicker/blob/master/src/js/angular-datepicker.js#L348\r\n\r\nIn my case the date will be transformed to sth like '12-01-2012' and then the date cannot be parsed anymore.\r\n\r\nWhen I change the line to `date = Date.parse(newValue);` then it works. How is `set-date` supposed to be used together with `date-format`? If you think my change is good I can send a PR."},"comment":{"url":"https://api.github.com/repos/720kb/angular-datepicker/issues/comments/219527400","html_url":"https://github.com/720kb/angular-datepicker/issues/171#issuecomment-219527400","issue_url":"https://api.github.com/repos/720kb/angular-datepicker/issues/171","id":219527400,"user":{"login":"pbouda","id":477192,"avatar_url":"https://avatars.githubusercontent.com/u/477192?v=3","gravatar_id":"","url":"https://api.github.com/users/pbouda","html_url":"https://github.com/pbouda","followers_url":"https://api.github.com/users/pbouda/followers","following_url":"https://api.github.com/users/pbouda/following{/other_user}","gists_url":"https://api.github.com/users/pbouda/gists{/gist_id}","starred_url":"https://api.github.com/users/pbouda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pbouda/subscriptions","organizations_url":"https://api.github.com/users/pbouda/orgs","repos_url":"https://api.github.com/users/pbouda/repos","events_url":"https://api.github.com/users/pbouda/events{/privacy}","received_events_url":"https://api.github.com/users/pbouda/received_events","type":"User","site_admin":false},"created_at":"2016-05-16T19:50:09Z","updated_at":"2016-05-16T19:50:09Z","body":"I think it's because Date accepts only specific strings, as standardized in IETF and ISO. It even seems to be implementation differences:\r\n\r\n\"parsing of date strings with the Date constructor (and Date.parse, they are equivalent) is strongly discouraged due to browser differences and inconsistencies.\"\r\n\r\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date\r\n\r\nA format like \"yyyy-MM-dd\" will work on most implementations I guess. I think it might be an option for a workaround, but then the plugin must not use the filter with the dateFormat."}}