Yii2 Extension Demo

philippfrenzel/yii2-fullcalendar

Note: This is only a demo for the extension mentioned above. Check out the details at github! If you have issues or question, pls. make an issue at github! This extension is only a wrapper for the amazing efullcalendar.js library! If you wanna use it, pls. check out the license there - you can use this code "as is". I take no warrenty for it! ;)

Draggable Events

My Event 1
My Event 2
My Event 3
My Event 4
My Event 5

The needed code:

Event Hover:
function(start, end) {
    var title = prompt('Event Title:');
    var eventData;
    if (title) {
        eventData = {
            title: title,
            start: start,
            end: end
        };
        $('#w0').fullCalendar('renderEvent', eventData, true);
    }
    $('#w0').fullCalendar('unselect');
}
Event Click:
function(calEvent, jsEvent, view) {

    alert('Event: ' + calEvent.title);
    alert('Coordinates: ' + jsEvent.pageX + ',' + jsEvent.pageY);
    alert('View: ' + view.name);

    // change the border color just for fun
    $(this).css('border-color', 'red');

}