[英]display multiple event with difference color using Full Calendar
I want to display calendar based on "trainingrequestajax.php?dowhat=getapprovetraining" and "trainingrequestajax.php?dowhat=getavailabletraining" with difference color. 我想显示基于“ trainingrequestajax.php?dowhat = getapprovetraining”和“ trainingrequestajax.php?dowhat = getavailabletraining”的日历,并带有不同的颜色。 Anyone can help me how to use events or eventSources to solve this problems?
任何人都可以帮助我如何使用事件或eventSources解决此问题? I use this code to display as one event, i want to add more event data from "trainingrequestajax.php?dowhat=getavailabletraining" and display it with different color.
我使用此代码显示为一个事件,我想从“ trainingrequestajax.php?dowhat = getavailabletraining”中添加更多事件数据,并以不同的颜色显示它。
<link href='/ock/scripts/fullcalendar/fullcalendar.css' rel='stylesheet' />
<link href='/ock/scripts/fullcalendar/fullcalendar.print.css' rel='stylesheet' media='print' />
<script src='/ock/scripts/fullcalendar/lib/jquery.min.js'></script>
<script src='/ock/scripts/fullcalendar/lib/jquery-ui.custom.min.js'></script>
<script src='/ock/scripts/fullcalendar/fullcalendar.min.js'></script>
<script>
var $k = jQuery.noConflict();
$k(document).ready(function() {
var date = new Date();
var d = date.getDate();
var m = date.getMonth();
var y = date.getFullYear();
$k('#calendarview').fullCalendar({
header: {
left: 'prev,next today',
center: 'title',
right: 'month,basicWeek,basicDay'
},
events: "trainingrequestajax.php?dowhat=getapprovetraining",
eventColor: 'blue'
});
});
</script>
Thanks in advance. 提前致谢。
With the limited information that you have supplied, a suggestion would be: 鉴于您所提供的信息有限,建议如下:
$style = $_GET['dowhat'];
echo "<td class='{$style}'>...</td>
The define the necessary CSS. 定义必要的CSS。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.