0

我正在使用 FullCalendar 进行 Symfony 项目,我刚刚注意到我不能在日历上放置晚上 8 点之后的事件。(我现在正在使用议程周视图)是否有我必须删除的默认限制?我不认为这是由于我的以下设置...

slotMinutes: 10,
axisFormat: "HH'h'mm",
firstHour: 18,
minTime: 8,
maxTime: 24,
defaultEventMinutes: 40

你有什么想法吗?谢谢。

4

1 回答 1

0

好的,检查这个DEMO,http://jsfiddle.net/yeyene/5wMUx/1/

您需要像这样设置,并将这些文件包含在您的文件中。

1) http://arshaw.com/js/fullcalendar-1.5.3/fullcalendar/fullcalendar.css

2) http://arshaw.com/js/fullcalendar-1.5.3/jquery/jquery-1.7.1.min.js

3) http://arshaw.com/js/fullcalendar-1.5.3/jquery/jquery-ui-1.8.17.custom.min.js

4) http://arshaw.com/js/fullcalendar-1.5.3/fullcalendar/fullcalendar.min.js

HTML

<div id='calendar'></div>

CSS

body {
    margin-top: 40px;
    text-align: center;
    font-size: 14px;
    font-family: "Lucida Grande",Helvetica,Arial,Verdana,sans-serif;
}
#calendar {
    width: 600px;
    margin: 0 auto;
}

查询

$(document).ready(function() {
    var date = new Date();
    var d = date.getDate();
    var m = date.getMonth();
    var y = date.getFullYear();

    var calendar = $('#calendar').fullCalendar({
        slotMinutes: 10,
        axisFormat: "HH'h'mm",
        firstHour: 18,
        minTime: 8,
        maxTime: 24,
        defaultEventMinutes: 40,            
        header: {
            left: 'prev,next today',
            center: 'title',
            right: 'month,agendaWeek,agendaDay'
        },
        selectable: true,
        selectHelper: true,
        select: function(start, end, allDay) {
            var title = prompt('Event Title:');
            if (title) {
                calendar.fullCalendar('renderEvent',
                    {
                        title: title,
                        start: start,
                        end: end,
                        allDay: allDay
                    },
                    true // make the event "stick"
                );
            }
            calendar.fullCalendar('unselect');
        },
        editable: true,
        events: []
    });   
});
于 2013-06-07T15:41:39.003 回答