</
script
>
</
head
>
<
div
id
=
"
calendar
"
>
</
div
>
js代码片段
function initdata(){
var calendar = $('#calendar').fullCalendar({
* 默认显示的视图
* month 一页显示一月, 日历样式
basicWeek 一页显示一周, 无特殊样式
basicDay 一页显示一天, 无特殊样式
agendaWeek 一页显示一周, 显示详细的24小时表格
agendaDay 一页显示一天, 显示详细的24小时表格
listYear 年列表(V3.*支持)
listMonth 月列表(V3.*支持)
listWeek 周列表(V3.*支持)
listDay 日列表(V3.*支持)
defaultView:"agendaWeek",
customButtons: {
myCustomButton: {
text: 'custom!',
click: function() {
header: {
left: 'prev,next today',
center: 'title myCustomButton',
right: 'month,agendaWeek,agendaDay,listWeek'
height : 600,
contentHeight : 200,
handleWindowResize : false,
firstDay : 1,
isRTL : false,
fixedWeekCount : false,
weekNumbers : true,
eventLimit: true,
viewRender : function(view,element){
windowResize : function(){
allDayText : "全天",
slotDuration : "01:00:00",
slotLabelFormat : "H(:mm)a",
slotLabelInterval : "02:00:00",
snapDuration : "05:00:00",
slotEventOverlap : false,
noEventsMessage : "L没数据啊",
defaultDate : '2016-10-13',
nowIndicator : true,
buttonText : {today:'今天',month:'月',week:'周',day:'日',listWeek:'列表'},
monthNames : ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
monthNamesShort: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
dayNames: ["周日", "周一", "周二", "周三", "周四", "周五", "周六"],
dayNamesShort: ["周日", "周一", "周二", "周三", "周四", 周五, "六"],
weekNumberTitle : "周",
eventLimitText : "更多",
dayPopoverFormat : "YYYY年M月D日",
navLinks : true,
dayClick: function(date, jsEvent, view) {
eventClick: function(calEvent, jsEvent, view) {
return false;
eventMouseover: function(calEvent, jsEvent, view){
$(this).css('background-color', 'gray');
eventMouseout: function(calEvent, jsEvent, view){
$(this).css('background-color', 'yellow');
selectable: true,
selectHelper: true,
unselectAuto : true,
unselectCancel : "",
selectOverlap : true,
selectAllow : function(selectInfo){
return true;
select: function(start, end,jsEvent,view) {
unselect : function(view, jsEvent){
lazyFetching : true,
defaultTimedEventDuration : "02:00:00",
defaultAllDayEventDuration : { days: 1 },
loading : function(isLoading, view){
if(isLoading == true){
console.log("view:"+view+",开始加载");
}else if(isLoading == false){
console.log("view:"+view+",加载完成");
}else{
console.log("view:"+view+",除非天塌下来否则不会进这个分支");
eventOrder : "title",
eventRender : function(event, element, view) {
eventAfterAllRender : function(view){
},
editable: true,
eventStartEditable : true,
eventDurationEditable : false,
dragOpacity:0.2,
dragScroll : true,
eventOverlap : true,
eventConstraint : {
start: '10:00',
end: '18:00',
dow: [ 1, 2, 3, 4 ]
longPressDelay : 1000,
eventDragStart : function(event, jsEvent, ui, view){
eventDragStop : function(event, jsEvent, ui, view){
eventDrop : function(event, delta, revertFunc, jsEvent, ui, view){
eventResizeStart : function( event, jsEvent, ui, view ) {
eventResizeStop : function(event, jsEvent, ui, view){
eventResize : function(event, delta, revertFunc, jsEvent, ui, view){