问题描述
如何将更多信息添加到特定视图?
我想从我的mysql表格中显示dayAgenda视图的更多关于我的事件的信息(已存储到数组中的值来自我的json-events.php )。
我阅读了fullcalendar的文档,特别是关于eventRender的内容,但我不明白代码的解释。
请问我该怎么做?感谢。
知道任何你可以调用事件对象的地方,你可以调用你想要的任何字段。 AKA。
eventRender:function(event){
var description = event.description;
var firstname = event.firstname;} //或
eventMouseover:function(event){
var description = event.description;
var lastname = event.lastname;} //或
eventResize(event):function(event){
var description = event.description;
var place = event.place;} //你得到图片...
您也可以使用...指定特定的视图。
var view = calendar.fullCalendar('getView');
if(view.name ===agendaDay){
//做某事
}
或者通过在回调中使用一些内置视图对象,如...
(view.name ===agendaDay){
//做某事
}
}
How can I add more information to a specific view?
I want to display more info about my events with the dayAgenda view from my mysql table (the values that are already stored into the array coming from my json-events.php).
I read the documentation of the fullcalendar, especially about eventRender, but I do not understand the explanation of the code.
Please, how can I do that? Thanks.
Know that anywhere you can call an "event object" you can call any of the fields you desire from your array. AKA.
eventRender: function(event){
var description = event.description;
var firstname = event.firstname;} //or
eventMouseover: function(event){
var description = event.description;
var lastname = event.lastname;} // or
eventResize(event): function(event){
var description = event.description;
var place = event.place;} // you get the picture...
Also you can specify a specific view by using...
var view = calendar.fullCalendar('getView');
if(view.name === "agendaDay"){
// do something
}
or by using some of the built in view objects inside the callbacks like...
eventRender: function(event, element, view){
if(view.name === "agendaDay"){
// do something
}
}
这篇关于在fullcalendar中添加有关活动的更多信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!