Fullcalendar双击显示弹出窗口

时间:2013-12-06 09:28:59

标签: javascript jquery jquery-ui calendar fullcalendar

双击任何日期时想要打开弹出窗口。这样我就可以在特定日期插入活动。我该如何实现呢?

我正在分享我的代码:

$(document).ready(function() {

        $('#calendar').fullCalendar({
        // ----- This Parameter is Used for displaying Next,Previous,Today,Month,Week & Day ------ //   
        header: {
            left: 'prev,next today',
            center: 'title',
            right: 'month,basicWeek,basicDay',
            ignoreTimezone: false
        },
        selectable  : true,
        selectHelper: true,         
        editable    : true,
        events      : "ajax/schedule_response.php",//Fetching JSON From PHP File//

        // ----- This Parameter is Used for Dragging Events ------ //   
        eventDrop   : function(event, delta) {

            $.ajax({
                    type: "POST",
                    url : "ajax/schedule_update.php",
                    data: "id="+event.id, 
                    cache: false,
                    beforeSend:  function() 
                        {
                        },
                    success: function(html)
                        {
                        }
                 });
            },

        // ----- This Parameter is Used for Resizing Events ------ //   
        eventResize : function(event,dayDelta,minuteDelta,revertFunc) {

            $.ajax({
                type: "POST",
                url : "ajax/schedule_update.php",
                data: "id="+event.id,
                cache: false, 
                beforeSend:  function() 
                    {
                    },
                success: function(html)
                    {
                    }
            });
            },

        loading: function(bool) {
            if (bool) $('#loading').show();
            else $('#loading').hide();
        }
    });
});

1 个答案:

答案 0 :(得分:0)

试试此选项

 eventRender: function(event, element) {
          element.bind('dblclick', function() {
             alert('double click!');
          });
       }