admin管理员组

文章数量:1287169

I put three views in my fullcalendar : month, agendaWeek and agendaDay. I need to activate drag & drop and forbidden events resizing. I use this following solution to do that on each render event :

$("#calendar").fullCalendar(
'renderEvent',
 {
    title: "event name",
    editable: true,
    disableResizing: true
 },
 true
);

It's only working in the month view, that is I can drag & drop and resize events in agendaWeek and agendaDay views. How can I remove resizing in this views ?

Thanks.

I put three views in my fullcalendar : month, agendaWeek and agendaDay. I need to activate drag & drop and forbidden events resizing. I use this following solution to do that on each render event :

$("#calendar").fullCalendar(
'renderEvent',
 {
    title: "event name",
    editable: true,
    disableResizing: true
 },
 true
);

It's only working in the month view, that is I can drag & drop and resize events in agendaWeek and agendaDay views. How can I remove resizing in this views ?

Thanks.

Share Improve this question asked Jul 15, 2013 at 9:48 user2428648user2428648 1175 silver badges14 bronze badges 1
  • 2 In newer version you can set it by eventDurationEditable: false – Novasol Commented Jun 6, 2018 at 9:41
Add a ment  | 

4 Answers 4

Reset to default 4

I try to use the calendar option durationEditable:false but it did not work. The workaround was to use CSS and hide the resize element:

.fc-resizer.fc-end-resizer {
    display: none;
}

place eventStartEditable: false as shown here:

initialView: 'resourceTimeline',
slotMinWidth:1,
eventDurationEditable: false, // Disable Resize
eventStartEditable: false, // disable dreage drop
eventTimeFormat: {
  hour: '2-digit',
  minute: '2-digit',
  hour12: true
},

Its Working, for More https://fullcalendar.io/docs/v1/disableResizing

disableResizing is available only as a global setting in FullCalendar. So if you want to disable resizing of all events in the calendar, you simply set the setting when you initialize FullCalendar:

var $calendar = $('#calendar').fullCalendar({
    [...]
    disableResizing: true,
    [...]
});

If you want to disable resizing of specific events, you could take a look at this pull request.

place editable:false as shown here:

  header:{
     left:'prev,next today',
     center:'title',
     right: 'agendaWeek, list, rrule'//'month,agendaWeek,agendaDay'
    },
    editable:false, // place it under header. it worked for me

Works for Version 3

本文标签: javascriptFullcalendardisableResizing is only working on month viewStack Overflow