{"action":"created","issue":{"url":"https://api.github.com/repos/angular/material/issues/6997","repository_url":"https://api.github.com/repos/angular/material","labels_url":"https://api.github.com/repos/angular/material/issues/6997/labels{/name}","comments_url":"https://api.github.com/repos/angular/material/issues/6997/comments","events_url":"https://api.github.com/repos/angular/material/issues/6997/events","html_url":"https://github.com/angular/material/issues/6997","id":130943276,"number":6997,"title":"md-datepicker date format validation issue","user":{"login":"iamisti","id":4672916,"avatar_url":"https://avatars.githubusercontent.com/u/4672916?v=3","gravatar_id":"","url":"https://api.github.com/users/iamisti","html_url":"https://github.com/iamisti","followers_url":"https://api.github.com/users/iamisti/followers","following_url":"https://api.github.com/users/iamisti/following{/other_user}","gists_url":"https://api.github.com/users/iamisti/gists{/gist_id}","starred_url":"https://api.github.com/users/iamisti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iamisti/subscriptions","organizations_url":"https://api.github.com/users/iamisti/orgs","repos_url":"https://api.github.com/users/iamisti/repos","events_url":"https://api.github.com/users/iamisti/events{/privacy}","received_events_url":"https://api.github.com/users/iamisti/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/angular/material/labels/P1%20-%20Broken%20Renders%20/%20Major%20Use%20Cases","name":"P1 - Broken Renders / Major Use Cases","color":"bfe5bf"}],"state":"closed","locked":false,"assignee":{"login":"jelbourn","id":838736,"avatar_url":"https://avatars.githubusercontent.com/u/838736?v=3","gravatar_id":"","url":"https://api.github.com/users/jelbourn","html_url":"https://github.com/jelbourn","followers_url":"https://api.github.com/users/jelbourn/followers","following_url":"https://api.github.com/users/jelbourn/following{/other_user}","gists_url":"https://api.github.com/users/jelbourn/gists{/gist_id}","starred_url":"https://api.github.com/users/jelbourn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jelbourn/subscriptions","organizations_url":"https://api.github.com/users/jelbourn/orgs","repos_url":"https://api.github.com/users/jelbourn/repos","events_url":"https://api.github.com/users/jelbourn/events{/privacy}","received_events_url":"https://api.github.com/users/jelbourn/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/angular/material/milestones/11","html_url":"https://github.com/angular/material/milestones/Backlog","labels_url":"https://api.github.com/repos/angular/material/milestones/11/labels","id":865967,"number":11,"title":"Backlog","description":"Grouping for issues that have been reviewed and require further information before assignment to milestone is possible.","creator":{"login":"ThomasBurleson","id":210413,"avatar_url":"https://avatars.githubusercontent.com/u/210413?v=3","gravatar_id":"","url":"https://api.github.com/users/ThomasBurleson","html_url":"https://github.com/ThomasBurleson","followers_url":"https://api.github.com/users/ThomasBurleson/followers","following_url":"https://api.github.com/users/ThomasBurleson/following{/other_user}","gists_url":"https://api.github.com/users/ThomasBurleson/gists{/gist_id}","starred_url":"https://api.github.com/users/ThomasBurleson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ThomasBurleson/subscriptions","organizations_url":"https://api.github.com/users/ThomasBurleson/orgs","repos_url":"https://api.github.com/users/ThomasBurleson/repos","events_url":"https://api.github.com/users/ThomasBurleson/events{/privacy}","received_events_url":"https://api.github.com/users/ThomasBurleson/received_events","type":"User","site_admin":false},"open_issues":1333,"closed_issues":342,"state":"open","created_at":"2014-11-14T00:54:02Z","updated_at":"2016-02-04T19:31:15Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2016-02-03T07:49:18Z","updated_at":"2016-02-04T19:31:15Z","closed_at":"2016-02-04T19:31:15Z","body":"Hi Guys,\r\n\r\n**Description**\r\nThere is an issue with having a formatted date with the `md-datepicker` directive.\r\nAfter I used `$mdDateLocaleProvider` to set up the date format I need, now it's no longer possible to edit the dates manually (not using the date picker, just changing the numbers inside the input)\r\n\r\nUsing the picker still works, the problem is only with manually editing the dates there.\r\nHere is a plunkr, try to edit the month or the date number to something else and you'll see that the validation will kick-off.\r\n\r\nThe interesting thing is that I've used this date format: `DD/MM/YYYY`\r\nBut if I use a different date format like this: `MM/DD/YYYY` then everything is working. (probably only because of my regional settings cause somehow it's trying to apply my region defaults to the validation rules... just a hint.)\r\n\r\n**Retro steps:**\r\n1. open example: http://codepen.io/iamisti/pen/ZQjgOG\r\n2. load the example and pick this date with the date picker: 24/02/2016\r\n3. try to change february to march, e.g.: 24/03/2016\r\n\r\n**Expected behaviour:** \r\nvalidation still passes\r\n\r\n**Current behaviour:**\r\nvalidation kicks-off\r\n\r\n**Browser**\r\nChrome  48.0.2564.97 (64-bit)\r\n\r\n**Version used:** \r\n`1.0.3`"},"comment":{"url":"https://api.github.com/repos/angular/material/issues/comments/180014683","html_url":"https://github.com/angular/material/issues/6997#issuecomment-180014683","issue_url":"https://api.github.com/repos/angular/material/issues/6997","id":180014683,"user":{"login":"jelbourn","id":838736,"avatar_url":"https://avatars.githubusercontent.com/u/838736?v=3","gravatar_id":"","url":"https://api.github.com/users/jelbourn","html_url":"https://github.com/jelbourn","followers_url":"https://api.github.com/users/jelbourn/followers","following_url":"https://api.github.com/users/jelbourn/following{/other_user}","gists_url":"https://api.github.com/users/jelbourn/gists{/gist_id}","starred_url":"https://api.github.com/users/jelbourn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jelbourn/subscriptions","organizations_url":"https://api.github.com/users/jelbourn/orgs","repos_url":"https://api.github.com/users/jelbourn/repos","events_url":"https://api.github.com/users/jelbourn/events{/privacy}","received_events_url":"https://api.github.com/users/jelbourn/received_events","type":"User","site_admin":false},"created_at":"2016-02-04T19:31:15Z","updated_at":"2016-02-04T19:31:15Z","body":"@iamisti You're setting a custom date formatter, but not the parser (`parseDate`) which is also required in order for the component to know how to convert a string into a date instance. Without specifying that, it defaults to using the browsers default parser, which see \"24/02/2016\" as an invalid date."}}