更改事件源背景和文本颜色全日历



如何以数组形式更改事件源的背景颜色?

<script>
var curSource = new Array();
//first source uses querystring to determine what events to pull back
curSource[0] = "<?php echo site_url('home/calendarListReferrals/') ?>";
//second source just returns all events
curSource[1] = "<?php echo site_url('home/calendarListRequests/') ?>";
var newSource = new Array(); //we'll use this later
$(document).ready(function() {     
    $('#calendar').fullCalendar({
        height: 600,
        eventSources: [curSource[0],curSource[1]],
        header: {
            left: 'prev',
            center: 'title',
            right: 'next'
        },

curSource[0] 和 curSource[1] 应该有不同的颜色。

这是我

所做的,感谢您的回复。

$(document).ready(function() {     
    $('#calendar').fullCalendar({
        lang: 'en',
        eventSources: [
        {
            url: curSource[0],
            type: 'POST',
            error: function() {
                alert('there was an error while fetching events!');
            },
            color: 'yellow',
            textColor: 'black'
        },
        {
            url: curSource[1],
            type: 'POST',
            error: function() {
                alert('there was an error while fetching events!');
            },
            color: 'blue',
            textColor: 'white'
        }
        ],

相关内容

  • 没有找到相关文章