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

zoom a month #19

Closed
sebastienguay opened this issue Apr 26, 2016 · 11 comments
Closed

zoom a month #19

sebastienguay opened this issue Apr 26, 2016 · 11 comments

Comments

@sebastienguay
Copy link

Is there a way to see only one month in big size like a zoom ?

@krizajb
Copy link

krizajb commented Apr 26, 2016

I would just hide all uninterested months of the year and css the month to your needs.

var showMonth = new Date().getMonth()+1; // Show only current month

 $('.calendar .month-container').each(function(idx, el){
    if (idx != showMonth ) {
      $(this).css("display", "none");
    }
 })

@sebastienguay
Copy link
Author

Good job! but the size of is the same. So small, not big like a zoom

@krizajb
Copy link

krizajb commented Apr 26, 2016

Well yeah, that's where the css comes in handy, after all only you know how it should/must look like :)

@comwiz756
Copy link

comwiz756 commented May 19, 2016

var showMonth = new Date().getMonth()+1; // Show only current month

 $('.calendar .month-container').each(function(idx, el){
    if (idx != showMonth ) {
      $(this).css("display", "none");
    }
 }) 

where does this code go?

Edit: Ok figured it out but.. I don't think it should be new Date().getMonth()+1; rather it should be just new Date().getMonth()

@comwiz756
Copy link

captureaa capturaaecapturey

It would be awesome if we could do something like this... I like the event adding part but changes in the calendar would be awesome..

@krizajb
Copy link

krizajb commented May 19, 2016

Just to help fellow mates which might be dealing with same issues in the future. This code is pasted after calendar initialization. The code simply hides all months but the selected one(s). In this case you might be right, since indexing from each loop and getMonth() is both zero based :)

@Paul-DS
Copy link
Owner

Paul-DS commented May 19, 2016

@anup756 : The functionality that you are looking for is not the goal of this calendar. The principal goal of this widget is to display a full year view. There is other calendars that propose this type of functionality (i.e. bootstrap calendar)

@comwiz756
Copy link

comwiz756 commented May 19, 2016

Oh ok cool

Edit: Honestly @Paul-DS I like your calendar better than the one you just posted :) Yours is just simple and easy to use, especially the events part. I'll figure out a way to just show the month.. :) Thanks though 👍

@jcorreia
Copy link

jcorreia commented Jun 9, 2016

Hi,
nice job with this calendar, but like anup756 says, it would be awesome if we add the option to see only a particular month, more or less like the bootstrap calendar you posted.

Thanks !

@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