在页面中添加如下JS可禁止日历项的拖拽

ExecuteOrDelayUntilScriptLoaded(function(){

var calendarCreate = SP.UI.ApplicationPages.CalendarContainerFactory.create;

SP.UI.ApplicationPages.CalendarContainerFactory.create = function(elem, cctx, viewType, date, startupData) {

if(cctx.dataSources && cctx.dataSources instanceof Array && cctx.dataSources.length > 0){

for(var i = 0; i < cctx.dataSources.length; i++){

cctx.dataSources[i].disableDrag = true;

}

}

calendarCreate(elem, cctx, viewType, date, startupData);

}

}, 'SP.UI.ApplicationPages.Calendar.js');

posted on 2012-11-09 14:10  Roy Cao  阅读(279)  评论(0编辑  收藏  举报