Fullcalendar - Block drag and drop when creating new events

Asked

Viewed 319 times

1

Hello,

I have a question in drag n drop function in Full Calendar. I am doing a web project and I need to limit the use in some functions, such as limiting the scheduling time (in my case in 1 hour duration) and I need to disable the drag and drop feature when creating the new event. I read the documentation on the site and could not quite understand how to do it. Any idea how to do it? Thank you very much.

    $(document).ready(function() {
            $('#calendar').fullCalendar({
                header: {
                    left: 'prev,next today',
                    center: 'title',
                    right: 'month,agendaWeek,agendaDay'
                },
                defaultDate: Date(), //pega a data atual
                defaultView: 'agendaWeek', // limita a view para a semana
                defaultTimedEventDuration:'01:00:00',
                dragScroll: false,
                eventDurationEditable: false,
                navLinks: false, // can click day/week names to navigate views
                droppable: false,
                editable: false,
                eventStartEditable: false,
                eventLimit: false, 

           })
       })

1 answer

0

The only way I could was in fullcalendar.min.js looking for

selectionFootprint = _this.computeSelection(origHitFootprint, hitFootprint); 

and replace with

selectionFootprint = _this.computeSelection(origHitFootprint, origHitFootprint); 

so it will only read the initial "clicked" and will ignore where your mouse stopped

Browser other questions tagged

You are not signed in. Login or sign up in order to post.