diff --git a/package.json b/package.json index a25574971..917f1b0b7 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "version": "2.0.0", "license": "MIT", "homepage": "https://github.com/Hacker0x01/react-datepicker", - "main": "lib", + "main": "lib/index.js", "module": "es", "unpkg": "dist/react-datepicker.min.js", "style": "dist/react-datepicker.min.css", diff --git a/test/calendar_test.js b/test/calendar_test.js index 91a72cb96..0db262167 100644 --- a/test/calendar_test.js +++ b/test/calendar_test.js @@ -309,14 +309,9 @@ describe("Calendar", function() { prevMonth.simulate("click"); - if (utils.getMonth(selected) === 0) { - // This test has issues with January - expect(utils.getMonth(selected)).to.be.equal(0); - } else { - expect(utils.getMonth(selected)).to.be.equal( - utils.getMonth(calendar.state().date) + 1 - ); - } + expect(utils.getMonth(selected)).to.be.equal( + (utils.getMonth(calendar.state().date) + 1) % 12 + ); }); it("should go to next month", function() {