【问题标题】:change EventSource background and text color fullcalendar更改 EventSource 背景和文本颜色 fullcalendar
【发布时间】:2014-12-31 18:17:42
【问题描述】:

如何改变数组形式的eventSources的背景颜色?

<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] 应该有不同的颜色。

【问题讨论】:

标签: jquery fullcalendar


【解决方案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'
        }
        ],

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-12-25
    • 1970-01-01
    • 1970-01-01
    • 2013-07-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-02-06
    相关资源
    最近更新 更多