year-calendar / js-year-calendar

A fully customizable year calendar widget
https://year-calendar.github.io/
Apache License 2.0
194 stars 71 forks source link

Allow more than 12 months in calendar #83

Open fhfournier opened 2 years ago

fhfournier commented 2 years ago

Hi,

I saw there is a function (another PR) to setNumberMonthsDisplayed and its nice but my customer need more than 12 months for the first 2 months of the current year. So if i update line 265 in options object. I could easy update to 14 and the output is perfect!

Here my recommandation, thanks

numberMonthsDisplayed: !isNaN(parseInt(opt.numberMonthsDisplayed)) && opt.numberMonthsDisplayed > 0 ? parseInt(opt.numberMonthsDisplayed) : 12,