fullCalendar超帅的无刷新响应式日历演示

支持移动端响应式,颜色选择,按照月、日、周排序,并且可指定到具体时间。可实时编辑、添加、拖动的fullCalendar日历插件。代码很简单,而且数据表已建好。

基于ace模板的#calendar


//编辑修改 
function editEvent(id, title, start, end, code) { 
start = DateUtil.Format("yyyy/MM/dd hh:mm:ss", start); 
if (end == null) { 
end = start; 
} else { 
end = DateUtil.Format("yyyy/MM/dd hh:mm:ss", end); 

$.post(getUrl("Canlendar/postEvent"), {id: id, title: title, start: start, end: end, code: code}, function(data) { 
}, "json") 

// code类型: 拖动resize (延长或缩短天数) ,drop 整体延长或缩短天数 
function daysEvent(id, days, code) { 
$.post(getUrl("Canlendar/daysEvent"), {id: id, days: days, code: code}, function(data) { 

}) 

//删除 
function delEvent(id) { 
$.post(getUrl("Canlendar/delEvent"), {id: id}, function(data) { 

}) 

//添加 
function addEvent(title, start, end, code) { 
if (title == null || title == '') { 
return false; 

start = DateUtil.Format("yyyy/MM/dd hh:mm:ss", start); 
if (end == null) { 
end = start; 
} else { 
end = DateUtil.Format("yyyy/MM/dd hh:mm:ss", end); 

var allDay = getAllDay(start, end); 
$.post(getUrl("Canlendar/postEvent"), {id: 0, title: title, start: start, end: end, code: code}, function(data) { 
$('#calendar').fullCalendar('renderEvent', {title: title, start: start, end: end, allDay: allDay, id: data.id, className: code}, true); 
}, "json"); 
}

更多资料、代码下载:http://www.erdangjiade.com/js/846.html

你可能感兴趣的:(代码,原创,PHP,菜鸟)