How to get resource id on eventReceive in resourceTimeGridDay in Fullcalendar

别说谁变了你拦得住时间么 提交于 2021-01-28 07:27:30

问题


I am trying to drop an external event into a resourceTimeGridDay but can't find the current resource id in the view. Where in the info object is the resource id listed?

 eventReceive(info) {
      console.log("eventReceive:", info);
    }

回答1:


The resource is in : info.event._def.resourceIds

console.log('eventReceive', info.event._def.resourceIds);




回答2:


Problem is solved.

info.event.getResources() will return an array of resources.

Here is the solution: https://github.com/fullcalendar/fullcalendar/issues/5215#event-2936400933



来源:https://stackoverflow.com/questions/59644244/how-to-get-resource-id-on-eventreceive-in-resourcetimegridday-in-fullcalendar

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!