问题描述
你好朋友,
我使用完整的日历API来查看项目中的事件。现在项目需求发生变化,需要添加名为resource的新视图。我试过谷歌,但没有得到成功的结果。
你有任何一个想法。
提前谢谢。
Hello frnds,
I am using full calendar API for viewing the events in my project. now project requirement change and need to add new view named resource. I tried with google but not get success result for this.
have you any one idea about this.
Thanks in advance.
推荐答案
resources: [
{
name: 'Resource 2',
id: 'resource2'
},
{
name: 'Resource 1',
id: 'resource1',
readonly: true
}
],
events: [
{
title: 'Long Event',
start: new Date(y, m, d-5),
end: new Date(y, m, d-2),
resource: 'resource1'
},
{
title: 'Meeting',
start: new Date(y, m, d, 10, 30),
allDay: false,
resource: ['resource4','resource2']
}
],
您还可以在资源选项中插入一个URL(如在事件中):
资源:'http://hostname/jsonresources.php'
不同颜色的周末标题? ::你可以使用类fc-weekend来影响周末标题和fc-weekend-column周末列,例如背景颜色。
一个非常简单的方法使用PHP的FullCalendar的多个资源
You can also insert a URL in the resources option (like in events):
resources: 'http://hostname/jsonresources.php'
Weekend headers in different color? :: You can use class fc-weekend to affect to weekend headers and fc-weekend-column for weekend columns for example background color.
A VERY simple way to pass multiple resources to FullCalendar with PHP
// This is a sample array
这篇关于在完整日历中添加资源视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!