{"action":"closed","issue":{"url":"https://api.github.com/repos/alenaksu/mdPickers/issues/100","repository_url":"https://api.github.com/repos/alenaksu/mdPickers","labels_url":"https://api.github.com/repos/alenaksu/mdPickers/issues/100/labels{/name}","comments_url":"https://api.github.com/repos/alenaksu/mdPickers/issues/100/comments","events_url":"https://api.github.com/repos/alenaksu/mdPickers/issues/100/events","html_url":"https://github.com/alenaksu/mdPickers/issues/100","id":154066751,"number":100,"title":"ng-invalid-required attribute is set at the beginnig even when it has value","user":{"login":"jfelixalba","id":9699405,"avatar_url":"https://avatars.githubusercontent.com/u/9699405?v=3","gravatar_id":"","url":"https://api.github.com/users/jfelixalba","html_url":"https://github.com/jfelixalba","followers_url":"https://api.github.com/users/jfelixalba/followers","following_url":"https://api.github.com/users/jfelixalba/following{/other_user}","gists_url":"https://api.github.com/users/jfelixalba/gists{/gist_id}","starred_url":"https://api.github.com/users/jfelixalba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jfelixalba/subscriptions","organizations_url":"https://api.github.com/users/jfelixalba/orgs","repos_url":"https://api.github.com/users/jfelixalba/repos","events_url":"https://api.github.com/users/jfelixalba/events{/privacy}","received_events_url":"https://api.github.com/users/jfelixalba/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-05-10T17:49:10Z","updated_at":"2016-05-10T18:02:24Z","closed_at":"2016-05-10T18:02:24Z","body":"Hi, \r\n\r\nI need your help to solve a problem that I have with the mdp-date-picker, I set a default date (current) in my model, and when the page is loaded, the attribute ng-invalid-required always is assigned to the element, setting a wrong attribute to my input, these reasons cause that my form cannot be submitted.\r\n\r\nI attach my code.\r\n\r\n**HTML:**\r\n`<mdp-date-picker name=\"inicio\" ng-required=\"true\" ng-model=\"Filtro.Inicio\" mmdp-placeholder=\"Fecha (dd/mm/yyyy)\" mdp-min-date=\"minDate\" mdp-max-date=\"maxDate\">\r\n</mdp-date-picker>\r\n<span class=\"help-inline\" ng-show=\"bitacoraForm.inicio.$error.required\">Fecha es requerida</span>\r\n <span class=\"help-inline\" ng-show=\"bitacoraForm.inicio.$error.minDate\">Fecha mínima es {{minDate}}</span> \r\n<span class=\"help-inline\" ng-show=\"bitacoraForm.inicio.$error.maxDate\">Fecha máxima es {{maxDate}}</span>`\r\n\r\n**Controller**\r\n`var actualDate = new Date();\r\n\r\n    $scope.Filtro = {\r\n        Usuario: \"\",\r\n        Inicio: actualDate,\r\n        Fin: actualDate\r\n    };\r\n\r\n    $scope.minDate = moment(new Date(\r\n        $scope.Filtro.Inicio.getFullYear() - 1,\r\n        $scope.Filtro.Inicio.getMonth(),\r\n        $scope.Filtro.Inicio.getDate())).format('YYYY-MM-DD');\r\n    $scope.maxDate = moment(new Date(\r\n        $scope.Filtro.Inicio.getFullYear(),\r\n        $scope.Filtro.Inicio.getMonth(),\r\n        $scope.Filtro.Inicio.getDate() + 1)).format('YYYY-MM-DD');`\r\n\r\nThank you.\r\n\r\n\r\n\r\n"}}