fullcalendar,我可以从gcal添加位置,我可以根据不同的位置事件(来自同一日历)给出不同的颜色

时间:2017-12-20 10:31:53

标签: fullcalendar

这是我的代码,日历和事件显示正确,但我想给他们更多的颜色和位置,有人可以帮忙吗?

<!DOCTYPE html> <html> <head> <meta charset='utf-8' />
<link href='fullcalendar-3.8.0/fullcalendar.min.css' rel='stylesheet' />
<link href='fullcalendar-3.8.0/fullcalendar.print.min.css' rel='stylesheet' media='print' />
<script src='fullcalendar-3.8.0/lib/moment.min.js'></script>
<script src='fullcalendar-3.8.0/lib/jquery.min.js'></script>
<script src='fullcalendar-3.8.0/fullcalendar.min.js'></script>
<script src='fullcalendar-3.8.0/gcal.min.js'></script>
<script> 
    $(document).ready(function() {
        $('#calendar').fullCalendar({
            header: {
                left: 'prev,next today',
                center: 'title',
                right: 'month,agendaWeek,agendaDay'
            },

            displayEventTime: true, // don't show the time column in list view
            editable: true,       defaultView: 'agendaWeek',
            googleCalendarApiKey: 'private', 
            // Key van de google calender 
            events: { url:'private' },
            eventClick: function(event) {
                // opens events in a popup window
                window.open(event.url, 'gcalevent', 'width=700,height=600');
                return false;
            },

            loading: function(bool) {
                $('#loading').toggle(bool);
            }
        });
    });
</script>
<style>
    body {
        margin: 40px 10px;
        padding: 0;
        font-family: "Lucida Grande",Helvetica,Arial,Verdana,sans-serif;
        font-size: 14px;   
    }
    #loading {
        display: none;
        position: absolute;
        top: 10px;
        right: 10px;   
    }

   #calendar {
       max-width: 900px;
       margin: 0 auto;   }
</style>
</head>
<body>
    <div id='loading'>loading...</div>
    <div id='calendar'></div>
</body>
</html>

0 个答案:

没有答案