{"action":"created","comment":{"url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/pulls/comments/53514219","id":53514219,"diff_hunk":"@@ -4,54 +4,72 @@ import _ from 'lodash';\n class DateInput extends React.Component {\n   constructor() {\n     super();\n-    this.state = {month: '', date: '', year: ''};\n-    this.handleMonthChange = this.handleMonthChange.bind(this);\n-    this.handleDateChange = this.handleDateChange.bind(this);\n-    this.handleYearChange = this.handleYearChange.bind(this);\n+    this.state = {hasError: false};\n+    this.handleChange = this.handleChange.bind(this);\n   }\n \n   componentWillMount() {\n     this.id = _.uniqueId('date-input-');\n   }\n \n-  handleMonthChange(event) {\n-    this.setState({month: event.target.value});\n-  }\n+  handleChange() {\n+    const date = {\n+        month: this.refs.month.value,\n+        day: this.refs.day.value,\n+        year: this.refs.year.value\n+      }\n+\n+    // Update UI based on validation.\n+    if (!this.validate(date.day, date.month, date.year)) {","path":"_health-care/_js/_components/date_input.jsx","position":27,"original_position":27,"commit_id":"552565b66478582102a9f20f2f8aa8359e13965c","original_commit_id":"552565b66478582102a9f20f2f8aa8359e13965c","user":{"login":"akainic","id":3886085,"avatar_url":"https://avatars.githubusercontent.com/u/3886085?v=3","gravatar_id":"","url":"https://api.github.com/users/akainic","html_url":"https://github.com/akainic","followers_url":"https://api.github.com/users/akainic/followers","following_url":"https://api.github.com/users/akainic/following{/other_user}","gists_url":"https://api.github.com/users/akainic/gists{/gist_id}","starred_url":"https://api.github.com/users/akainic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akainic/subscriptions","organizations_url":"https://api.github.com/users/akainic/orgs","repos_url":"https://api.github.com/users/akainic/repos","events_url":"https://api.github.com/users/akainic/events{/privacy}","received_events_url":"https://api.github.com/users/akainic/received_events","type":"User","site_admin":false},"body":"Sounds good","created_at":"2016-02-19T20:30:06Z","updated_at":"2016-02-19T20:30:06Z","html_url":"https://github.com/department-of-veterans-affairs/vets-website/pull/1219#discussion_r53514219","pull_request_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/pulls/1219","_links":{"self":{"href":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/pulls/comments/53514219"},"html":{"href":"https://github.com/department-of-veterans-affairs/vets-website/pull/1219#discussion_r53514219"},"pull_request":{"href":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/pulls/1219"}}},"pull_request":{"url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/pulls/1219","id":59875826,"html_url":"https://github.com/department-of-veterans-affairs/vets-website/pull/1219","diff_url":"https://github.com/department-of-veterans-affairs/vets-website/pull/1219.diff","patch_url":"https://github.com/department-of-veterans-affairs/vets-website/pull/1219.patch","issue_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/issues/1219","number":1219,"state":"open","locked":false,"title":"Implement application-wide state and update flow. Unittest <DateInput>.","user":{"login":"awong-dev","id":144579,"avatar_url":"https://avatars.githubusercontent.com/u/144579?v=3","gravatar_id":"","url":"https://api.github.com/users/awong-dev","html_url":"https://github.com/awong-dev","followers_url":"https://api.github.com/users/awong-dev/followers","following_url":"https://api.github.com/users/awong-dev/following{/other_user}","gists_url":"https://api.github.com/users/awong-dev/gists{/gist_id}","starred_url":"https://api.github.com/users/awong-dev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/awong-dev/subscriptions","organizations_url":"https://api.github.com/users/awong-dev/orgs","repos_url":"https://api.github.com/users/awong-dev/repos","events_url":"https://api.github.com/users/awong-dev/events{/privacy}","received_events_url":"https://api.github.com/users/awong-dev/received_events","type":"User","site_admin":false},"body":"Proof of concept for storing application wide state with a subcomponent.\r\n\r\nAlso has basic validation code to DateInput and unittests to verify the component behaves properly.","created_at":"2016-02-18T22:41:43Z","updated_at":"2016-02-19T20:30:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"15a9a1b071170403672922d53b672a9b742d9326","assignee":{"login":"akainic","id":3886085,"avatar_url":"https://avatars.githubusercontent.com/u/3886085?v=3","gravatar_id":"","url":"https://api.github.com/users/akainic","html_url":"https://github.com/akainic","followers_url":"https://api.github.com/users/akainic/followers","following_url":"https://api.github.com/users/akainic/following{/other_user}","gists_url":"https://api.github.com/users/akainic/gists{/gist_id}","starred_url":"https://api.github.com/users/akainic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akainic/subscriptions","organizations_url":"https://api.github.com/users/akainic/orgs","repos_url":"https://api.github.com/users/akainic/repos","events_url":"https://api.github.com/users/akainic/events{/privacy}","received_events_url":"https://api.github.com/users/akainic/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/pulls/1219/commits","review_comments_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/pulls/1219/comments","review_comment_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/pulls/comments{/number}","comments_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/issues/1219/comments","statuses_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/statuses/552565b66478582102a9f20f2f8aa8359e13965c","head":{"label":"department-of-veterans-affairs:react-databinding","ref":"react-databinding","sha":"552565b66478582102a9f20f2f8aa8359e13965c","user":{"login":"department-of-veterans-affairs","id":5421563,"avatar_url":"https://avatars.githubusercontent.com/u/5421563?v=3","gravatar_id":"","url":"https://api.github.com/users/department-of-veterans-affairs","html_url":"https://github.com/department-of-veterans-affairs","followers_url":"https://api.github.com/users/department-of-veterans-affairs/followers","following_url":"https://api.github.com/users/department-of-veterans-affairs/following{/other_user}","gists_url":"https://api.github.com/users/department-of-veterans-affairs/gists{/gist_id}","starred_url":"https://api.github.com/users/department-of-veterans-affairs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/department-of-veterans-affairs/subscriptions","organizations_url":"https://api.github.com/users/department-of-veterans-affairs/orgs","repos_url":"https://api.github.com/users/department-of-veterans-affairs/repos","events_url":"https://api.github.com/users/department-of-veterans-affairs/events{/privacy}","received_events_url":"https://api.github.com/users/department-of-veterans-affairs/received_events","type":"Organization","site_admin":false},"repo":{"id":33202667,"name":"vets-website","full_name":"department-of-veterans-affairs/vets-website","owner":{"login":"department-of-veterans-affairs","id":5421563,"avatar_url":"https://avatars.githubusercontent.com/u/5421563?v=3","gravatar_id":"","url":"https://api.github.com/users/department-of-veterans-affairs","html_url":"https://github.com/department-of-veterans-affairs","followers_url":"https://api.github.com/users/department-of-veterans-affairs/followers","following_url":"https://api.github.com/users/department-of-veterans-affairs/following{/other_user}","gists_url":"https://api.github.com/users/department-of-veterans-affairs/gists{/gist_id}","starred_url":"https://api.github.com/users/department-of-veterans-affairs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/department-of-veterans-affairs/subscriptions","organizations_url":"https://api.github.com/users/department-of-veterans-affairs/orgs","repos_url":"https://api.github.com/users/department-of-veterans-affairs/repos","events_url":"https://api.github.com/users/department-of-veterans-affairs/events{/privacy}","received_events_url":"https://api.github.com/users/department-of-veterans-affairs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/department-of-veterans-affairs/vets-website","description":"Beta version of Vets.gov","fork":false,"url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website","forks_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/forks","keys_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/keys{/key_id}","collaborators_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/teams","hooks_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/hooks","issue_events_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/issues/events{/number}","events_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/events","assignees_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/assignees{/user}","branches_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/branches{/branch}","tags_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/tags","blobs_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/git/refs{/sha}","trees_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/git/trees{/sha}","statuses_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/statuses/{sha}","languages_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/languages","stargazers_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/stargazers","contributors_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/contributors","subscribers_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/subscribers","subscription_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/subscription","commits_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/commits{/sha}","git_commits_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/git/commits{/sha}","comments_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/comments{/number}","issue_comment_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/issues/comments{/number}","contents_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/contents/{+path}","compare_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/compare/{base}...{head}","merges_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/merges","archive_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/downloads","issues_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/issues{/number}","pulls_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/pulls{/number}","milestones_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/milestones{/number}","notifications_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/labels{/name}","releases_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/releases{/id}","deployments_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/deployments","created_at":"2015-03-31T18:34:05Z","updated_at":"2016-02-16T09:18:40Z","pushed_at":"2016-02-19T18:35:36Z","git_url":"git://github.com/department-of-veterans-affairs/vets-website.git","ssh_url":"git@github.com:department-of-veterans-affairs/vets-website.git","clone_url":"https://github.com/department-of-veterans-affairs/vets-website.git","svn_url":"https://github.com/department-of-veterans-affairs/vets-website","homepage":"","size":71519,"stargazers_count":39,"watchers_count":39,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":20,"mirror_url":null,"open_issues_count":87,"forks":20,"open_issues":87,"watchers":39,"default_branch":"master"}},"base":{"label":"department-of-veterans-affairs:master","ref":"master","sha":"0417ae398b3fad934bc4404f5d11efbc7cfbc1eb","user":{"login":"department-of-veterans-affairs","id":5421563,"avatar_url":"https://avatars.githubusercontent.com/u/5421563?v=3","gravatar_id":"","url":"https://api.github.com/users/department-of-veterans-affairs","html_url":"https://github.com/department-of-veterans-affairs","followers_url":"https://api.github.com/users/department-of-veterans-affairs/followers","following_url":"https://api.github.com/users/department-of-veterans-affairs/following{/other_user}","gists_url":"https://api.github.com/users/department-of-veterans-affairs/gists{/gist_id}","starred_url":"https://api.github.com/users/department-of-veterans-affairs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/department-of-veterans-affairs/subscriptions","organizations_url":"https://api.github.com/users/department-of-veterans-affairs/orgs","repos_url":"https://api.github.com/users/department-of-veterans-affairs/repos","events_url":"https://api.github.com/users/department-of-veterans-affairs/events{/privacy}","received_events_url":"https://api.github.com/users/department-of-veterans-affairs/received_events","type":"Organization","site_admin":false},"repo":{"id":33202667,"name":"vets-website","full_name":"department-of-veterans-affairs/vets-website","owner":{"login":"department-of-veterans-affairs","id":5421563,"avatar_url":"https://avatars.githubusercontent.com/u/5421563?v=3","gravatar_id":"","url":"https://api.github.com/users/department-of-veterans-affairs","html_url":"https://github.com/department-of-veterans-affairs","followers_url":"https://api.github.com/users/department-of-veterans-affairs/followers","following_url":"https://api.github.com/users/department-of-veterans-affairs/following{/other_user}","gists_url":"https://api.github.com/users/department-of-veterans-affairs/gists{/gist_id}","starred_url":"https://api.github.com/users/department-of-veterans-affairs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/department-of-veterans-affairs/subscriptions","organizations_url":"https://api.github.com/users/department-of-veterans-affairs/orgs","repos_url":"https://api.github.com/users/department-of-veterans-affairs/repos","events_url":"https://api.github.com/users/department-of-veterans-affairs/events{/privacy}","received_events_url":"https://api.github.com/users/department-of-veterans-affairs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/department-of-veterans-affairs/vets-website","description":"Beta version of Vets.gov","fork":false,"url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website","forks_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/forks","keys_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/keys{/key_id}","collaborators_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/teams","hooks_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/hooks","issue_events_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/issues/events{/number}","events_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/events","assignees_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/assignees{/user}","branches_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/branches{/branch}","tags_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/tags","blobs_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/git/refs{/sha}","trees_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/git/trees{/sha}","statuses_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/statuses/{sha}","languages_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/languages","stargazers_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/stargazers","contributors_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/contributors","subscribers_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/subscribers","subscription_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/subscription","commits_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/commits{/sha}","git_commits_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/git/commits{/sha}","comments_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/comments{/number}","issue_comment_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/issues/comments{/number}","contents_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/contents/{+path}","compare_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/compare/{base}...{head}","merges_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/merges","archive_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/downloads","issues_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/issues{/number}","pulls_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/pulls{/number}","milestones_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/milestones{/number}","notifications_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/labels{/name}","releases_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/releases{/id}","deployments_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/deployments","created_at":"2015-03-31T18:34:05Z","updated_at":"2016-02-16T09:18:40Z","pushed_at":"2016-02-19T18:35:36Z","git_url":"git://github.com/department-of-veterans-affairs/vets-website.git","ssh_url":"git@github.com:department-of-veterans-affairs/vets-website.git","clone_url":"https://github.com/department-of-veterans-affairs/vets-website.git","svn_url":"https://github.com/department-of-veterans-affairs/vets-website","homepage":"","size":71519,"stargazers_count":39,"watchers_count":39,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":20,"mirror_url":null,"open_issues_count":87,"forks":20,"open_issues":87,"watchers":39,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/pulls/1219"},"html":{"href":"https://github.com/department-of-veterans-affairs/vets-website/pull/1219"},"issue":{"href":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/issues/1219"},"comments":{"href":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/issues/1219/comments"},"review_comments":{"href":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/pulls/1219/comments"},"review_comment":{"href":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/pulls/1219/commits"},"statuses":{"href":"https://api.github.com/repos/department-of-veterans-affairs/vets-website/statuses/552565b66478582102a9f20f2f8aa8359e13965c"}}}}