我正在使用FullCalendar进行Symfony项目,我只是注意到我不能在晚上8点之后在日历上放置一个事件。 (我现在正在使用agendaWeek视图) 我必须删除默认限制吗?我不认为这是由于我的设置如下......
slotMinutes: 10,
axisFormat: "HH'h'mm",
firstHour: 18,
minTime: 8,
maxTime: 24,
defaultEventMinutes: 40
你有什么想法吗?感谢。
答案 0 :(得分: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
<div id='calendar'></div>
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: []
});
});