{"action":"created","issue":{"url":"https://api.github.com/repos/katemihalikova/ion-datetime-picker/issues/67","repository_url":"https://api.github.com/repos/katemihalikova/ion-datetime-picker","labels_url":"https://api.github.com/repos/katemihalikova/ion-datetime-picker/issues/67/labels{/name}","comments_url":"https://api.github.com/repos/katemihalikova/ion-datetime-picker/issues/67/comments","events_url":"https://api.github.com/repos/katemihalikova/ion-datetime-picker/issues/67/events","html_url":"https://github.com/katemihalikova/ion-datetime-picker/pull/67","id":178299021,"number":67,"title":"onChange & onCancel attributes","user":{"login":"WilliamDASILVA","id":2766008,"avatar_url":"https://avatars.githubusercontent.com/u/2766008?v=3","gravatar_id":"","url":"https://api.github.com/users/WilliamDASILVA","html_url":"https://github.com/WilliamDASILVA","followers_url":"https://api.github.com/users/WilliamDASILVA/followers","following_url":"https://api.github.com/users/WilliamDASILVA/following{/other_user}","gists_url":"https://api.github.com/users/WilliamDASILVA/gists{/gist_id}","starred_url":"https://api.github.com/users/WilliamDASILVA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WilliamDASILVA/subscriptions","organizations_url":"https://api.github.com/users/WilliamDASILVA/orgs","repos_url":"https://api.github.com/users/WilliamDASILVA/repos","events_url":"https://api.github.com/users/WilliamDASILVA/events{/privacy}","received_events_url":"https://api.github.com/users/WilliamDASILVA/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-21T09:52:26Z","updated_at":"2016-09-21T10:17:11Z","closed_at":"2016-09-21T10:17:11Z","pull_request":{"url":"https://api.github.com/repos/katemihalikova/ion-datetime-picker/pulls/67","html_url":"https://github.com/katemihalikova/ion-datetime-picker/pull/67","diff_url":"https://github.com/katemihalikova/ion-datetime-picker/pull/67.diff","patch_url":"https://github.com/katemihalikova/ion-datetime-picker/pull/67.patch"},"body":"Hello there,\r\n\r\nI needed to detect whenever the user clicks on 'OK' or 'Cancel'.\r\nUsing $watch on the model wasn't ok for me for multiple reasons.\r\nSo I added two more attributes 'on-change=' and 'on-cancel='.\r\n\r\n`<span ng-model=\"myDate\" ion-datetime-picker on-change=\"myFunction\" on-cancel=\"cancelFunction\">`\r\n\r\nIn controller:\r\n```\r\n$scope.myFunction = function(newDate){\r\n}\r\n\r\n$scope.cancelFunction = function(){\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/katemihalikova/ion-datetime-picker/issues/comments/248569984","html_url":"https://github.com/katemihalikova/ion-datetime-picker/pull/67#issuecomment-248569984","issue_url":"https://api.github.com/repos/katemihalikova/ion-datetime-picker/issues/67","id":248569984,"user":{"login":"katemihalikova","id":7225023,"avatar_url":"https://avatars.githubusercontent.com/u/7225023?v=3","gravatar_id":"","url":"https://api.github.com/users/katemihalikova","html_url":"https://github.com/katemihalikova","followers_url":"https://api.github.com/users/katemihalikova/followers","following_url":"https://api.github.com/users/katemihalikova/following{/other_user}","gists_url":"https://api.github.com/users/katemihalikova/gists{/gist_id}","starred_url":"https://api.github.com/users/katemihalikova/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/katemihalikova/subscriptions","organizations_url":"https://api.github.com/users/katemihalikova/orgs","repos_url":"https://api.github.com/users/katemihalikova/repos","events_url":"https://api.github.com/users/katemihalikova/events{/privacy}","received_events_url":"https://api.github.com/users/katemihalikova/received_events","type":"User","site_admin":false},"created_at":"2016-09-21T10:17:11Z","updated_at":"2016-09-21T10:17:11Z","body":"Hi William,\r\nthanks for your code!\r\n\r\nUnfortunately `change` event is already implemented using standard `ng-change` and I can't see any potential in supporting `cancel` event. I would consider it when there is more demand for it and also consider adding it for the next major version.\r\n\r\nIf you really want to use it, you can add `WilliamDASILVA/ion-datetime-picker#feature/events` to your `bower.json` file to pull your branch. Also don't forget to fix attribute signatures, from `\"=?\"` to `\"&?\"` or even `\"&\"` (event attrs should be considered optional automatically AFAIK).\r\n\r\nThanks anyway, good job!"}}
{"actor":{"display_login":"katemihalikova"}}