全日历安排程序无法添加单独的房间

时间:2017-12-12 06:02:14

标签: javascript fullcalendar fullcalendar-scheduler

我使用我的大学项目full-calendar,日历工作正常,但我有一些问题,我想知道如何添加一些房间(看我附加的图像)我试着添加但它重叠,请帮我解决一下 enter image description here 我添加resourceLabelText: 'Rooms2',不显示,看我在附加图像中绘制我的问题 这是我的代码

 <script>

    $(function() { // document ready

        $('#calendar').fullCalendar({
            now: '2017-12',
            editable: true, // enable draggable events
            aspectRatio: 1.8,
            scrollTime: '00:00', // undo default 6am scrollTime
            header: {
                left: 'today prev,next',
                center: 'title',
                right: 'timelineThreeDays'
            },
            defaultView: 'timelineThreeDays',
            views: {
                timelineThreeDays: {
                    type: 'timeline',
                    duration: { days: 31 }
                }
            },
            resourceLabelText: 'Rooms',

            resources: [
                { id: 'a', title: 'Auditorium A' },
                { id: 'b', title: 'Auditorium B', eventColor: 'green' },
                { id: 'c', title: 'Auditorium C', eventColor: 'orange' },
                { id: 'd', title: 'Auditorium D', children: [

                ] },
                { id: 'e', title: 'Auditorium E' },
                { id: 'f', title: 'Auditorium F', eventColor: 'red' },
                { id: 'g', title: 'Auditorium G' },
                { id: 'h', title: 'Auditorium H' },

            ],
            events: [

                // background event, associated with a resource
                //{ id: 'bg1', resourceId: 'b', rendering: 'background', start: '2017-11-07', end: '2017-11-10' },

                // background event, NOT associated with a resource
                //{ id: 'bg2', rendering: 'background', start: '2017-11-07', end: '2017-11-07' },

                // normal events...
                { id: '6', resourceId: 'g', start: '2017-11-07', end: '2017-11-08', title: 'event 1' },
                { id: '7', resourceId: 'h', start: '2017-11-09', end: '2017-11-12', title: 'event 2' },
                { id: '8', resourceId: 'i', start: '2017-11-11', end: '2017-11-15', title: 'event 3' },
                { id: '9', resourceId: 'j', start: '2017-11-17', end: '2017-11-19', title: 'event 4' },
                { id: '10', resourceId: 'k', start: '2017-11-27', end: '2017-11-28', title: 'event 5' }
            ],
            resourceLabelText: 'Rooms2',

            resources: [
                { id: 'g', title: 'Auditorium G' },
                { id: 'h', title: 'Auditorium H', eventColor: 'green' },
                { id: 'i', title: 'Auditorium I', eventColor: 'orange' },
                { id: 'j', title: 'Auditorium J', children: [

                ] },
                { id: 'e', title: 'Auditorium E' },
                { id: 'f', title: 'Auditorium F', eventColor: 'red' },
                { id: 'g', title: 'Auditorium G' },
                { id: 'h', title: 'Auditorium H' },

            ],
            events: [

                // background event, associated with a resource
                //{ id: 'bg1', resourceId: 'b', rendering: 'background', start: '2017-11-07', end: '2017-11-10' },

                // background event, NOT associated with a resource
                //{ id: 'bg2', rendering: 'background', start: '2017-11-07', end: '2017-11-07' },

                // normal events...
                { id: '1', resourceId: 'b', start: '2017-11-07', end: '2017-11-08', title: 'event 1' },
                { id: '2', resourceId: 'c', start: '2017-11-09', end: '2017-11-12', title: 'event 2' },
                { id: '3', resourceId: 'd', start: '2017-11-11', end: '2017-11-15', title: 'event 3' },
                { id: '4', resourceId: 'e', start: '2017-11-17', end: '2017-11-19', title: 'event 4' },
                { id: '5', resourceId: 'f', start: '2017-11-27', end: '2017-11-28', title: 'event 5' }
            ]





        });


    });

</script>

0 个答案:

没有答案