FullCalendar更改日历上特定事件的可编辑属性

FullCalendar更改日历上特定事件的可编辑属性

本文介绍了Jquery FullCalendar更改日历上特定事件的可编辑属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前使用jQuery FullCalendar来创建一个调度应用程序。在我的应用程序中,我只需要为不是由登录用户创建的事件的事件设置editable = false;而由登录用户创建的事件应具有editable = true。任何可以建议我如何在FullCalendar中将事件的可编辑属性设置为false,并将事件设置为true。 ($ {

  $('#calendar')。fullCalendar({
标题:{
left:'prev,next today',
center:'title',
right:'month,agendaWeek,agendaDay'
},
editable:false,//设置为false
events:[
{
title:'This must be editable',
start:new Date('2011/1/1' ),
editable:true
},
{
title:'这是不可编辑的',
start:new Date('11/1/1'') ,
end:new Date('11 / 1/2011')
}

]
});

});




I am currently using jQuery FullCalendar to create a scheduling application. In my application I need to set editable=false only for events which is not an event created by the logged in user; whereas, the event that is created by the logged in user should have editable= true. Can any on suggest me how I could set few editable property of event in a FullCalendar as false and few events as true.

解决方案

Set the master editable property to false and set the editable property of the event's that you want to be editable to true.

$('#calendar').fullCalendar({
        header: {
            left: 'prev,next today',
            center: 'title',
            right: 'month,agendaWeek,agendaDay'
        },
        editable: false, // set this false
        events: [
        {
            title: 'This must be editable',
            start: new Date('11/1/2011'),
            editable:true
        },
        {
            title: 'This is non editable',
            start: new Date('11/1/2011'),
            end: new Date('11/1/2011')
        }

        ]
    });

});

http://jsfiddle.net/G6K6Y/94/

这篇关于Jquery FullCalendar更改日历上特定事件的可编辑属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-29 12:13