Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

adding a click event to fullcalendar

How can I add a click event on an event and pass the day and event time as a url variable to another page? When a user clicks on an event I want to pass the date and event time to another page for processing.

like image 325
sbekele Avatar asked Mar 26 '10 16:03

sbekele


2 Answers

$('#calendar').fullCalendar({
    eventClick: function(calEvent, jsEvent, view) {
        window.location = "http://www.domain.com?start=" + calEvent.start;

    }
});

Look here for more info: http://arshaw.com/fullcalendar/docs/mouse/eventClick/

like image 126
Dustin Laine Avatar answered Sep 23 '22 12:09

Dustin Laine


callback for clicking date grid:

dayClick: function(date, allDay, jsEvent, view) {
...
}

callback for clicking event:

eventClick: function(event) {
...
}

You can try this real world demo: http://www.gbin1.com/technology/jquery/devappwithfullcanlendar/gbin1schedule.htm

like image 40
terry Avatar answered Sep 24 '22 12:09

terry