jQuery fullcalendar:如何保存拖动和重新调整大小的项目

从昨天起我正在寻找一种方法来保存(mysql + php)使用jQuery fullcalendar拖动和重新调整项目大小 。 没有教程,只有几个例子。 有人可以发布他的工作json.php,json-events.php和外部数据库更新脚本吗? 或者引导我阅读最佳解释,教程或示例?</ p>

我正在努力使其完全正常工作 </ p>

所有帮助非常感谢!</ p>
</ div>

展开原文

原文

Since yesterday I am looking for a way to save (mysql + php) dragged and re-sized items with jQuery fullcalendar. There are no tutorials and just a few examples. Can someone post his working json.php, json-events.php and external database update scripts? Or guide me to the best explanations, tutorials or examples?

I'm trying to get this fully working

all help much appreciated!

2个回答



它可能无法完全回答您的问题,但希望这会指向正确的方向。 基本上我正在尝试做同样的事情,但在ASP .NET中,使用日历作为数据操纵器,并以某种方式从日历中捕获更新的事件并发送回服务器进行更新。</ p>

< p>我注意到有一些事件回调可能很有用。</ p>


  1. eventDrop回调 - 在日历上删除/移动事件时触发
    http://arshaw.com/fullcalendar/docs/event_ui/eventDrop/ </ p> </ li>

  2. eventResize回调 - 在调整事件大小时触发
    http://arshaw.com/fullcalendar/docs/event_ui/eventResize/ </ p> </ li>
    </ ol>

    我想你 然后可以使用所涉及的事件详细信息对服务器进行ajax调用,以便相应地更新事件。</ p>
    </ div>

展开原文

原文

it may not fully answered your question, but hope this will point you to the right direction. Basically I'm trying to do the same thing but in ASP .NET, using the calendar as the data manipulator and somehow capture the updated events from the calendar and send back to the server for updates.

I noticed that there are a few event callbacks which might be useful.

  1. The eventDrop callback - fired when an event is dropped/moved on the calendar http://arshaw.com/fullcalendar/docs/event_ui/eventDrop/

  2. The eventResize callback - fired when an event is resized http://arshaw.com/fullcalendar/docs/event_ui/eventResize/

I suppose you could then make ajax calls to the server with the involved events detail in order to update the events accordingly.

duanping1920
duanping1920 嘿谢谢你的回答:)在这里:code.google.com/p/fullcalendar/issues/list是很多答案。 谢谢你的时间!
8 年多之前 回复



完整日历v4
,在日历选项中的文档</ p>

的帮助下</ p>

  eventDrop:function(info){
if(!confirm(“你确定这个改变吗?”)){
info.revert();
}
modifyEvent (info.event);
</ code> </ pre>

使用ajax更新</ p>

 &lt; script&gt; 
function modifyEvent(event) {

var start = event.start;
var end = event.end;
$ .ajax({
type:“POST”,
url:“/ appointment / update”,
data :{“id”:event.id,“start”:start,“end”:end},
traditional:true,
success:function(msg){
console.log(msg);
} ,
错误:function(msg){
console.log(msg);
alert('我们无法处理您的请求');
}
});
}
&lt; / script&gt ;
</ code> </ pre>
</ div>

展开原文

原文

Full Calendar v4 with help from the documentation

inside your calendar options

eventDrop: function(info) {
  if(!confirm("Are you sure about this change?")) {
  info.revert();
}
  modifyEvent(info.event);

update using ajax

<script>
function modifyEvent(event) {

  var start = event.start;
  var end = event.end;
  $.ajax({
    type:"POST",
    url:"/appointment/update",
    data:{"id":event.id,"start":start,"end":end},
    traditional:true,
    success:function(msg){
      console.log(msg);
    },
    error:function(msg){
      console.log(msg);
      alert('We are unable to process your request');
    }
  });
}
</script>

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问