javascriptreactjscalendarfullcalendarfullcalendar-5

FullCalendar make editable option view-specific


Is there any way to change editable option depending on view? I want to make it 'false' for month view and 'true' for week view.


Solution

  • Unfortunately no. As per the documentation, you can set view-specific options.

    e.g.

    views: {
      timeGridWeek: {
        editable: true
      },
      dayGridMonth: {
        editable: false
      }
    }
    

    However, at the time of writing it appears that editable is not one of the options which is allowed to be specified per-view. It's not very clear from the documentation which options are and aren't supported in this way.

    Demo: https://codepen.io/ADyson82/pen/gOLWjmr - the option does not get applied.

    Perhaps you can make a feature request or even contribute the necessary code yourself.