问题描述
嗨,我希望我的选择选项变为可拖动以将事件放入 fullcalendar,但它不起作用告诉我我错在哪里。 谢谢
$('.Sel_Odl').select2({
cloSEOnSelect : false,placeholder : "Cerca Ordine di Lavoro",minimumInputLength: 1,width: "100%",ajax: {
url: '../PHP/fetch-odl.PHP',dataType: 'json',delay: 250,data: function (data) {
return {
searchTerm: data.term // search term
};
},processResults: function (response) {
return {
results:response
};
},cache: true
}
});
$('.Sel_Odl').on('select2:select',function (e) {
// it doesn't need to have a start or end
var eventObject = {
title: $.trim($(this).text()) // use the element's text as the event title
}
// store the Event Object in the DOM element so we can get to it later
$(this).data('eventObject',eventObject)
// make the event draggable using jQuery UI
$(this).draggable({
zIndex : 1070,revert : true,// will cause the event to go back to its
revertDuration: 0 // original position after the drag
})
return $("<div class='fc-event drag-task cucu' data-event='{\"title\":\"my event\"}' data-color=\"orange\" >" + $(this).text() + "</div>");
});
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)