首页 > 解决方案 > 如何将jqxscheduler拖到日历外

问题描述

我正在使用jqxscheduler。我想启用将事件拖动到下面的整个窗口给我正在使用initialize的日历代码我需要添加移动以使事件框可以拖动到日历之外

$("#scheduler").jqxScheduler({
  date: new $.jqx.date(2017, 11, 23),
  width: "100%",
  height: "100%",
  source: adapter,
  renderAppointment: function(data) {
    set();
    var img = "<img style='top: 2px;     height: 17px; position: relative;' src='" + data.appointment.location + "'/>";

    if (data.view == "weekView" || data.view == "dayView" || data.view == "monthView") {
      data.style = data.appointment.desc;
      data.style = data.appointment.description;
      data.html = img + "<i>" + data.appointment.subject + "</i>";
      /*
      if (data.appointment.id == "id1") {
          data.style = "#AA4643";
      }
      else if (data.appointment.id == "id2" || data.appointment.id == "id6") {
          data.style = "#309B46";
      }
      else if (data.appointment.id == "id3") {
          data.style = "#447F6E";
      }*/
    }
    return data;
  },
  ready: function() {
    $("#scheduler").jqxScheduler('ensureAppointmentVisible', 'id-11');
  },
  appointmentDataFields: {
    from: "start",
    to: "end",
    id: "id",
    description: "description",
    location: "location",
    subject: "subject",
    style: "style",
    color: "color",
    background: "background",
    borderColor: "borderColor"
  },
  view: 'weekView',
  appointmentsMinHeight: 20,
  width: '100%',
  height: '100%',

  views: [{
      type: "dayView",
      showWeekends: false,
      timeRuler: {
        scale: "quarterHour"
      }
    },
    {
      type: "weekView",
      showWeekends: false,
      timeRuler: {
        scale: "quarterHour"
      }
    },
    {
      type: "monthView",
      showWeekends: false,
      timeRuler: {
        scale: "quarterHour"
      }
    },
  ]
});

请检查上述定义代码的输出


在此处输入图像描述

标签: javascriptjqueryjqwidget

解决方案


推荐阅读