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

How to customize the year type view using fullcalender. #3975

Closed
subhrajyotiw5rtc opened this issue Dec 9, 2017 · 3 comments
Closed

How to customize the year type view using fullcalender. #3975

subhrajyotiw5rtc opened this issue Dec 9, 2017 · 3 comments

Comments

@subhrajyotiw5rtc
Copy link

I need to customize the year view of the fullcalender from jquery plugin. I am explaining my code below.

function getCalendar() {
      var todayDate = new Date().toISOString().slice(0, 10);
      // var evStartDate = new Date(inputdate)
      //console.log('date',evStartDate);
      //addClassByDate(evStartDate);
      $('#calendar').fullCalendar({
        theme: true,
        header: {
          left: 'prev,next',
          center: 'title',
          right: 'year,month,agendaWeek,agendaDay'
        },
        ///////// edit
        dayClick: function(date, jsEvent, view) {
          //alert('day click');
        },
        eventClick: function(event, jsEvent) {
          //alert('event clicked');
          $('#eventpopup').modal({
            backdrop: 'static'
          });
        },
        eventRender: function(event, element, view){
                    var evStart = moment(view.intervalStart).subtract(1, 'days');
                    var evEnd = moment(view.intervalEnd).subtract(1, 'days');
                    if (!event.start.isAfter(evStart) ||
                        event.start.isAfter(evEnd)) { return false; }
                },
        ///////////
        defaultDate: todayDate,
        navLinks: true, // can click day/week names to navigate views
        editable: true,
        eventLimit: true, // allow "more" link when too many events
        events: [{
          title: '1',
          start: '2017-12-01'
        }, {
          title: '2',
          start: '2017-12-02'
        }, {
          id: 999,
          title: '5',
          start: '2017-11-02'
        }]
      });
    }

Here In my month view all numbers(i.e-1,2...) is shown in date wise but in case of year view it showing multiple. Here I need some changes in case of year view means the total count like 2+1 will be shown in month wise. Let say for this example in month of December the total count should be 3 similarly in month of November the total count should 5 when only user click on year view.

I have also created one plunkr link which is given below.

my plunkr example code.

Here I need to resolve this type of requirement.

@acerix
Copy link
Member

acerix commented Dec 11, 2017

There is no built-in Year view currently, and there is an open issue to add that feature:
#1140

Please visit the link, give a 👍 to vote (?), press the 🔈Subscribe button to receive updates.

It looks like your example is based on quite an old version of FullCalendar (from 2013) and the source had been modified to have a Year view added. If this is a bug, please supply a runnable, stripped-down demonstration which uses an official and recent release.

If this is a question, please refer to the support page and use Stack Overflow for help.

@acerix acerix closed this as completed Dec 11, 2017
@Vahid1Ali
Copy link

mnmn,

@Vahid1Ali
Copy link

ojo

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

3 participants