{"action":"created","issue":{"url":"https://api.github.com/repos/ng2-ui/ng2-datetime-picker/issues/75","repository_url":"https://api.github.com/repos/ng2-ui/ng2-datetime-picker","labels_url":"https://api.github.com/repos/ng2-ui/ng2-datetime-picker/issues/75/labels{/name}","comments_url":"https://api.github.com/repos/ng2-ui/ng2-datetime-picker/issues/75/comments","events_url":"https://api.github.com/repos/ng2-ui/ng2-datetime-picker/issues/75/events","html_url":"https://github.com/ng2-ui/ng2-datetime-picker/issues/75","id":191844435,"number":75,"title":"unable to override date parse and format","user":{"login":"gufi","id":327083,"avatar_url":"https://avatars.githubusercontent.com/u/327083?v=3","gravatar_id":"","url":"https://api.github.com/users/gufi","html_url":"https://github.com/gufi","followers_url":"https://api.github.com/users/gufi/followers","following_url":"https://api.github.com/users/gufi/following{/other_user}","gists_url":"https://api.github.com/users/gufi/gists{/gist_id}","starred_url":"https://api.github.com/users/gufi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gufi/subscriptions","organizations_url":"https://api.github.com/users/gufi/orgs","repos_url":"https://api.github.com/users/gufi/repos","events_url":"https://api.github.com/users/gufi/events{/privacy}","received_events_url":"https://api.github.com/users/gufi/received_events","type":"User","site_admin":false},"labels":[{"id":348000843,"url":"https://api.github.com/repos/ng2-ui/ng2-datetime-picker/labels/bug","name":"bug","color":"ee0701","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-11-27T06:06:47Z","updated_at":"2016-12-05T17:05:25Z","closed_at":"2016-12-05T16:54:38Z","body":"The methods momentFormatDate and momentParse appear to still be called reguardless of overriding the methods in the example. \r\n\r\nPersonally I don't mind importing moment.js but figured I would notify that overriding them does not work as expected if  you don't.\r\n\r\ndoing the following will however allow full override\r\n``` javascript\r\n// Override Date object formatter\r\nDateTime.formatDate = (date: Date,dateOnly:boolean) : string => { return date.toDateString(); };\r\nDateTime.momentFormatDate = (date: Date, dateFormat:string): string=> { return DateTime.formatDate(date,true);};\r\n// Override Date object parser\r\nDateTime.parse = (str: any): Date => { return new Date(str); } ;\r\nDateTime.momentParse = DateTime.parse;\r\n```"},"comment":{"url":"https://api.github.com/repos/ng2-ui/ng2-datetime-picker/issues/comments/264912317","html_url":"https://github.com/ng2-ui/ng2-datetime-picker/issues/75#issuecomment-264912317","issue_url":"https://api.github.com/repos/ng2-ui/ng2-datetime-picker/issues/75","id":264912317,"user":{"login":"HerokunTan","id":15337429,"avatar_url":"https://avatars.githubusercontent.com/u/15337429?v=3","gravatar_id":"","url":"https://api.github.com/users/HerokunTan","html_url":"https://github.com/HerokunTan","followers_url":"https://api.github.com/users/HerokunTan/followers","following_url":"https://api.github.com/users/HerokunTan/following{/other_user}","gists_url":"https://api.github.com/users/HerokunTan/gists{/gist_id}","starred_url":"https://api.github.com/users/HerokunTan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HerokunTan/subscriptions","organizations_url":"https://api.github.com/users/HerokunTan/orgs","repos_url":"https://api.github.com/users/HerokunTan/repos","events_url":"https://api.github.com/users/HerokunTan/events{/privacy}","received_events_url":"https://api.github.com/users/HerokunTan/received_events","type":"User","site_admin":false},"created_at":"2016-12-05T17:05:25Z","updated_at":"2016-12-05T17:05:25Z","body":"oh!this is what i want"}}
{"actor":{"display_login":"HerokunTan"}}