Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hiding months? #101

Closed
tatanij opened this issue Feb 16, 2017 · 5 comments
Closed

Hiding months? #101

tatanij opened this issue Feb 16, 2017 · 5 comments

Comments

@tatanij
Copy link

tatanij commented Feb 16, 2017

Hi I'm looking to only have 3 months display within the current month. I'm quite new to bootstrap and was wondering if this is possible ?

@dannystarkDE
Copy link

dannystarkDE commented Feb 28, 2017

same here

@William-H-M
Copy link
Contributor

Maybe something like this can help #18

@pdarkness
Copy link
Contributor

pdarkness commented Mar 15, 2017

I used #18 as base for doing the same thing using the renderEnd function.

$('#calendar').calendar({ renderEnd: function (e) { var currentMonth = new Date().getMonth(); $('#calendar .month-container').each(function (idx, el) { if (idx < currentMonth) { $(this).css("display", "none"); } if (idx > currentMonth + 2) { $(this).css("display", "none"); } }); } });

@Paul-DS
Copy link
Owner

Paul-DS commented Apr 4, 2020

I know this thread is pretty old, but I'm working on this feature in the new version of the library: js-year-calendar
You can follow the development (and test the functionality) in the PR year-calendar#32

@Paul-DS
Copy link
Owner

Paul-DS commented Aug 24, 2021

The feature is available in js-year-calendar@v2.0.0. Check the options startDate and numberMonthsDisplayed in the documentation

@Paul-DS Paul-DS closed this as completed Aug 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants