全日历导轨可拖动/调整大小不起作用



我的第一个问题已经解决,事件没有出现但是出现了另一个问题,我无法拖动和调整大小。

关于活动.js.咖啡 :

$(document).ready ->
  $('#calendar').fullCalendar
    editable: true,
    header:
      left: 'prev,next today',
      center: 'title',
      right: 'month,agendaWeek,agendaDay'
    defaultView: 'month',
    height: 500,
    slotMinutes: 30,
    eventSources: [{
      url: '/admin/events',
    }],
    timeFormat: 'h:mm t{ - h:mm t} ',
    dragOpacity: "0.5"
    eventDrop: (event, dayDelta, minuteDelta, allDay, revertFunc) ->
      updateEvent(event);
    eventResize: (event, dayDelta, minuteDelta, revertFunc) ->
      updateEvent(event);

updateEvent = (the_event) ->
  $.update "/admin/events/" + the_event.id,
    event:
      name: the_event.title,
      starts_at: "" + the_event.start,
      ends_at: "" + the_event.end,
      ket: the_event.description

在浏览器控制台上

Uncaught TypeError: Object [object Object] has no method 'draggable' fullcalendar.js:2676
draggableDayEvent fullcalendar.js:2676
bindDaySeg fullcalendar.js:2658
(anonymous function) fullcalendar.js:1717
jQuery.event.dispatch jquery.js:3059
elemData.handle.eventHandle jquery.js:2677

assets/javascript/application.js

//= require jquery
//= require jquery_ujs
//= require dataTables/jquery.dataTables
//= require dataTables/jquery.dataTables.bootstrap
//= require redactor-rails
//= require_tree .
//= require bootstrap-alert
//= require bootstrap-dropdown
//= require jquery.rest
//= require jquery.ui.slider
//= require jquery.ui.datepicker
//= require fullcalendar

问题已解决

改变

//= require jquery.ui.slider
//= require jquery.ui.datepicker

//= require jquery.ui.all

相关内容

  • 没有找到相关文章

最新更新