{"action":"created","issue":{"url":"https://api.github.com/repos/buildo/rc-datepicker/issues/77","repository_url":"https://api.github.com/repos/buildo/rc-datepicker","labels_url":"https://api.github.com/repos/buildo/rc-datepicker/issues/77/labels{/name}","comments_url":"https://api.github.com/repos/buildo/rc-datepicker/issues/77/comments","events_url":"https://api.github.com/repos/buildo/rc-datepicker/issues/77/events","html_url":"https://github.com/buildo/rc-datepicker/pull/77","id":144211038,"number":77,"title":"Fix january calendar bug with moment > 2.11","user":{"login":"ingro","id":879431,"avatar_url":"https://avatars.githubusercontent.com/u/879431?v=3","gravatar_id":"","url":"https://api.github.com/users/ingro","html_url":"https://github.com/ingro","followers_url":"https://api.github.com/users/ingro/followers","following_url":"https://api.github.com/users/ingro/following{/other_user}","gists_url":"https://api.github.com/users/ingro/gists{/gist_id}","starred_url":"https://api.github.com/users/ingro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ingro/subscriptions","organizations_url":"https://api.github.com/users/ingro/orgs","repos_url":"https://api.github.com/users/ingro/repos","events_url":"https://api.github.com/users/ingro/events{/privacy}","received_events_url":"https://api.github.com/users/ingro/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-03-29T09:39:46Z","updated_at":"2016-03-29T11:02:30Z","closed_at":"2016-03-29T10:54:02Z","pull_request":{"url":"https://api.github.com/repos/buildo/rc-datepicker/pulls/77","html_url":"https://github.com/buildo/rc-datepicker/pull/77","diff_url":"https://github.com/buildo/rc-datepicker/pull/77.diff","patch_url":"https://github.com/buildo/rc-datepicker/pull/77.patch"},"body":"I think I found the roots of the problem reported on #65.\r\n\r\nIt seems that if the current month is january the `previousMonthLength` returns `NaN` with moment 2.11+. This happens because the change of year is not factored when calculating the value.\r\n\r\nIf for example I want to display january 2016, it will try to create a moment in this way to calculate the `previousMonthLength`:\r\n`moment([2016, -1])` which fails due to a stricter handling of invalid dates with moment 2.11+.\r\n\r\nSo I updated the code and now it should properly create a moment in this way:\r\n`moment([2015, 11])`.\r\n\r\nHope I didn't miss anything!"},"comment":{"url":"https://api.github.com/repos/buildo/rc-datepicker/issues/comments/202832294","html_url":"https://github.com/buildo/rc-datepicker/pull/77#issuecomment-202832294","issue_url":"https://api.github.com/repos/buildo/rc-datepicker/issues/77","id":202832294,"user":{"login":"ingro","id":879431,"avatar_url":"https://avatars.githubusercontent.com/u/879431?v=3","gravatar_id":"","url":"https://api.github.com/users/ingro","html_url":"https://github.com/ingro","followers_url":"https://api.github.com/users/ingro/followers","following_url":"https://api.github.com/users/ingro/following{/other_user}","gists_url":"https://api.github.com/users/ingro/gists{/gist_id}","starred_url":"https://api.github.com/users/ingro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ingro/subscriptions","organizations_url":"https://api.github.com/users/ingro/orgs","repos_url":"https://api.github.com/users/ingro/repos","events_url":"https://api.github.com/users/ingro/events{/privacy}","received_events_url":"https://api.github.com/users/ingro/received_events","type":"User","site_admin":false},"created_at":"2016-03-29T11:02:30Z","updated_at":"2016-03-29T11:02:30Z","body":"No problem, always happy to contribute when I can!"}}