+ Start a Discussion
Nikhil kanth NayaniNikhil kanth Nayani 

how to implement functionality on fullcalendar js for each view

Hi all,

I am making use of fullcalendar js, I want to get the view name like 'month' when switching from week to month or 'agendaDay' when switching from week to day. Is there any method which fullcalendar is providing or any other way to get the value?

Thanks in advance
George Galaios 12George Galaios 12
Although it is too late, i post an answer so that maybe someone gets helped in the future...
So you can use "viewSkeletonRender" like the code below:
var calendar = new FullCalendar.Calendar(ele, {
      customButtons: {
        myCustomButton: {
          text: "custom!",
          click: function () {
      header: {
        left: "prev,next,today,myCustomButton",
        center: "title",
        right: "dayGridMonth,timeGridWeek,timeGridDay"
      plugins: [
      events: this.eventsList,
      defaultView: "timeGridWeek",
      viewSkeletonRender: function (info) {
        alert("Change to type: " + info.view.type);
        this.queryTerm.value = info.view.type;

Vshayari LINESVshayari LINES
reddit manreddit man
how to enable reddit dark mode  Reddit dark mode (https://alltecinfo.com/reddit-dark-mode/" target="_blank)