Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sample for Full Calendar in jquery [closed]

I am trying to integrate the jquery Full Calendar (http://arshaw.com/fullcalendar/) in my asp.net mvc application.

I need to use this full calendar to add/edit/delete/show the events using the sql server database as backend.

Do anyone have the sample code to implement the add/edit/delete events with this Full Calendar.?

like image 356
Prasad Avatar asked Oct 08 '09 14:10

Prasad


1 Answers

function createCalendar() {

    var d = new Date();
    var y = d.getFullYear();
    var m = d.getMonth();

    $('#calendar').fullCalendar({
                editable : false,
                events : 'urltoevents'
                aspectRatio : 1.5,
                header : {
                    left : false,
                    center : 'title',
                    right : 'prev,next today'
                },
                eventClick : function(event) {
                    handle the click event.
                }
            });

};

function removeEvent(id){
    $('#calendar').fullCalendar('removeEvents', id);
}

function updateEvent(id, title){
    var event = $('#calendar').fullCalendar('clientEvents', id);
    event.title = title;
    $('#calendar').fullCalendar('updateEvent', event);
}
like image 196
lomaxx Avatar answered Oct 20 '22 18:10

lomaxx