fullcalendar使⽤教程$('#calendar')
.fullCalendar(
{
header : {
left : 'today prev,next',
center : 'title',
right : 'month,basicWeek'
},
buttonText : {
month : '⽉视图',
week : '周',
day : '⽇视图'
},
defaultDate : date,
eventPha : 5,
editable : fal,// 可以拖动
lectable : true,
eventLimit : true,
events:function(start, end, callback){
//prev上⼀⽉, next下⼀⽉等事件时调⽤
.fullCalendar( 'removeEvents' [, idOrFilter ] )
海报设计理念
}
eventOrder :'q',
// 注意:这⾥有两种实现⽅法,下⾯是⼀种,还有⼀种是通过url,如events:'/data.json' // events : [ {
// title : 'All Day Event',
// start : '2016-05-01'
// }, {
// title : 'Long Event',
// start : '2016-05-07',
// end : '2016-05-10'
// }, {
// id : 999,
// title : 'Repeating Event',
/
/ start : '2016-05-09'
// }, {
// id : 999,
// title : 'Repeating Event',
// start : '2016-05-16'
// }, {
// title : 'Conference',
// start : '2016-05-11',
// end : '2016-05-13'
联合利华校园招聘// }, {
// title : 'Meeting',
/
/ start : '2016-05-12',
// end : '2016-05-12'
// }, {
// title : 'Lunch',
// start : '2016-05-12'
// }, {
// title : 'Meeting',
莫莉快跑// start : '2016-05-12'
// }, {
// title : 'Happy Hour',
// start : '2016-05-12'
/
/ }, {
// title : 'Dinner',
// start : '2016-05-12'
// }, {
// title : 'Birthday Party',
// start : '2016-05-13'
// }, {
// title : 'Click for Google',
// url : '/',
// start : '2016-05-28'
// } ],
dayClick : function(date, allDay, jsEvent, view) {
var lDate = date.format();// 获取当前点击⽇期
$("#datetimepicker").val(lDate);
$("#taskModal").modal();
},
eventClick : function(calEvent, jsEvent, view) {
var today = calEvent.start.format();
switch (pe) {
ca 'video':
$(".view-audio").hide();
$(".view-picture").hide();
$(".view-video").show();
myPlayer.play();
$("#viewModal").modal();
感恩母亲的话break;
ca 'audio':
$(".view-video").hide()
$(".view-picture").hide();
$(".view-audio").show();
music.play();
$("#viewModal").modal();
break;
ca 'picture':
$(".view-video").hide()
$(".view-audio").hide();
$(".view-picture").show();
$('.caroul-inner').empty();
var html = "";
var count = 0;诚信手抄报
for (var i = 0; i < calEvent.source.events.length; i++) {
var type = calEvent.source.events[i].pe;
var currentDay = calEvent.source.events[i].start.format();
if (type == 'picture' && today == currentDay) {
if (count == 0) {
html += '<div class="item active"><img src="'
+ calEvent.source.events[i].data.img_url
+ '"></div>';
} el {
html += '<div class="item"><img src="'
+ calEvent.source.events[i].data.img_url
+ '"></div>';
}
count++;
}
}
if (count == 1) {
$('.caroul-control').hide()
} el {
$('.caroul-control').show()
}
$('.caroul-inner').append(html)
$("#viewModal").modal();
$('#myCaroul').caroul({
pau : true,
interval : fal
});
break;
ca 'cour':
$(this).attr('target', '_blank')
break;
ca 'other':
break;
}
}
});
$(".body-left .file-list").each(
function(index) {
var fileName = $(this).find('.fileName').text();
var dataType = $(this).find('.fileName').attr('data-type');
if (!dataType)
return;
var eventData = {
title : fileName,
start : datetimepicker,
backgroundColor : 'transparent',
textColor : '#03A9F4',
borderColor : '#fff',
q: und(Math.random() * 9 + 1)
}
switch (dataType) {
ca 'video':
eventData.className = 'icon-video-sm';
eventData.data = {
type : 'video'
};
人生如戏啊
break;
ca 'audio':
eventData.className = 'icon-audio-sm';// 这⾥可以设置此action的样式, eventData.data = {
type : 'audio'
};
break;
ca 'picture':
eventData.className = 'icon-picture-sm';// 这⾥可以设置此action的样式, eventData.data = {
type : 'picture',
img_url : '/resources/img/myCalendar/'
+ und(Math.random() * 5 + 1) + '.png'
};
break;
ca 'cour':我为祖国骄傲
eventData.className = 'icon-cour-sm';// 这⾥可以设置此action的样式, eventData.data = {业绩口号
type : 'cour'
};
eventData.url = '';
break;
ca 'other':
eventData.className = 'icon-other-sm';// 这⾥可以设置此action的样式, eventData.data = {
type : 'other'
};
break;
}
$('#calendar').fullCalendar('renderEvent', eventData, true);
})