我想基于显示日历 " trainingrequestajax.php dowhat = getapprovetraining"和#34; trainingrequestajax.php?dowhat = getavailabletraining"与不同的颜色。任何人都可以帮助我如何使用事件或eventSources来解决这个问题? 我使用此代码显示为一个事件,我想从" 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>
提前致谢。
答案 0 :(得分:0)
由于您提供的信息有限,建议如下:
$style = $_GET['dowhat'];
echo "<td class='{$style}'>...</td>
定义必要的CSS。