3

I need add drop event into fullcalendar for mobile. I use Jquery UI Touch Punch for that.

I find answer here 1, 2, 3, 4. It is work good for drop/drag/resize events , But does not work in the calendar.

My order of scripts:

    <script src="../static/js/jQuery-2.1.4.min.js"></script>
    <script src="../static/js/bootstrap.min.js"></script>
    <script src="../static/js/jquery-ui.min.js"></script>
    <script src="../static/js/jquery.ui.touch-punch.min.js"></script>
    <script src="../static/js/app.min.js"></script>
    <script src="../static/js/MyMain.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.10.2/moment.min.js"></script>
    <script src="../static/js/fullcalendar.min.js"></script>
    <script src='../static/js/fullcalendarlang-all.js'></script>
    <script>

  $( document ).ready(function() {
      function ini_events(ele) {
           ele.each(function () {
              var eventObject = {
                  title: $.trim($(this).text()) 
              };
              $(this).data('eventObject', eventObject);
              $(this).draggable({
                  zIndex: 1070,
                  revert: true, 
                  revertDuration: 0  
              });
          });
       }

       ini_events($('#external-events div.external-event'));
       $('#calendar').fullCalendar({
           events: JSON.parse(calendarjsonres),
           editable: true,
           eventDrop: function(event, delta, revertFunc) {...},
           eventResize: function(event, delta, revertFunc) {...},
           eventClick: function(calEvent, jsEvent, view) {...},
           droppable: true,
           drop: function (date, allDay) {...}
       });
  });
</script>

Thanks in advance.

Community
  • 1
  • 1

1 Answers1

1

The calendar doesn't use jQueryUI for it's internal dragging, you either have to check github for the status/report of the issue, or make the functionalities yourself.

Martijn Welker
  • 5,575
  • 1
  • 16
  • 26