如何获取轮班事件FullCalendar中的预约细节 [英] How to get the details of appointment in shift event FullCalendar

查看:263
本文介绍了如何获取轮班事件FullCalendar中的预约细节的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这个问题的标题可能并不完全代表我将要解释的动态。


我正在使用FullCalendar并使用一个开源库,允许我添加资源在顶部,您可以看到



最终结果





但它只是被转过来,所以我可能是错误的逻辑。
我需要获取在 FullCalendar 选项中定义的列ID和名称的属性:

  multiColAgendaWeek:
{
类型:'multiColAgenda',
持续时间:{星期:1},
列:[
{id:1,name:'First Column'},
{id:2,name:'Second Column'}
]
}

你们哪一个可以帮助我做到这一点?

解决方案

您是否尝试过 eventDrop 回调?如果你添加这个 -

  eventDrop:function(event,delta,revertFunc){
console.log(event) ;
}

在您的events数组后,您将能够看到如何访问任何特定事件数据。另外,如果您在任何其他问题上将文档发布到您正在使用的特定FullCalendar分支上,这将非常有帮助。


The title of the question probably does not fully represent the dynamics that I am about to explain.

I'm working with FullCalendar and with an open source library that allows me to add resources at the top, you can see the result of this JsFiddle.

As you can see every event is assigned to a resource (first column, second column). In fact we have two events:

Meeting 1 = First Column
Meeting 2 = Second Column

What I want to do is move Meeting 1 to second column (through the mouse of course) and be able to get through code the details of the column on which I moved the event, in this case the affected column is Second Column. I thought of a solution:

select: function(dtStart, dtEnd, jsEvent, event) 
{
    console.log(event.column, event.columnData);
}

Initial result

Final result

but it is just turned so I'm probably wrong logic.
I need to get the property of the column id and name defined in the FullCalendar option:

multiColAgendaWeek: 
{
    type: 'multiColAgenda',
    duration: { weeks: 1 },
    columns: [
                { id: 1, name: 'First Column' },
                { id: 2, name: 'Second Column' }
             ]
}

Which one of you can help me do this?

解决方案

Have you tried the eventDrop callback? If you add this -

eventDrop: function(event, delta, revertFunc) {
            console.log(event);
        }

After your events array you'll be able to see how you can access any specific event data. Also, it would be very helpful if you would post the documentation on the specific FullCalendar fork that you're using if you have any other questions.

这篇关于如何获取轮班事件FullCalendar中的预约细节的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆