How do I disable drag and drop in fullcalendar

Viewed 49690

I am using FullCalendar throughout my project and i need to display it in one area of my site where events are not draggable but to remain highlighted in the month view. Any ideas please.

12 Answers

Not worked for me: disableDragging: true

The bellow code worked for me so please try:

$('#example').fullCalendar({
    eventStartEditable: false
});

The above code stops dragging of any event date to another date

It's late but as per the new update in FULL CALENDAR

The disableDragging is depricated from fullcalendar now.

Here is the list of all Deprecated functions in full calander

So to disable the drag you need to add editable: false in the place where you create the event object.

Something like below.

this.events.push({
    id: meeting.id,
    title: "meeting 1",
    start: meetingStartDate,
    editable: false
});

For version 5.5.1 you want to use editable property and set it to false. That will make sure events can not be resized or dragged.

place eventStartEditable: false as shown here:

initialView: 'resourceTimeline',
slotMinWidth:1,
eventDurationEditable: false, // Disable Resize
// disableResizing:false  Currently Not Working

eventStartEditable: false, // disable dreage drop
// disableDragging:false  Currently Not Working
eventTimeFormat: {
  hour: '2-digit',
  minute: '2-digit',
  hour12: true
},

Its Working

for More https://fullcalendar.io/docs/v1/disableResizing https://fullcalendar.io/docs/v1/disableDragging

it depends on version :

$('#calendar').fullCalendar({
  ...
 disableDragging: true,
 editable: false,
 eventStartEditable: false,
  ...
});
Related