TypeError:$(...)。fullCalendar不是函数

时间:2016-10-01 16:30:40

标签: fullcalendar



$(document).ready(function () {
    $.datepicker.setDefaults($.datepicker.regional["en"]);
    //                $('.datepicker').datepicker({ dateFormat: 'dd-mm-yyyy' });
    $(':input.datepicker').datepicker({ dateFormat: 'yyyy-mm-dd' });

    $("form[id*=frmUpdateCalendar").validationEngine();
    
    //Initialisations
    initialize_Calendar();
});

/* Initialize external events
-----------------------------------------------------------------*/
function initialize_external_event(selector) {
    //initialize booking types
    $(selector).each(function () {

        //Make draggable
        $(this).draggable({
            revert: true,
            revertDuration: 0,
            zIndex: 999,
            cursorAt: {
                left: 10,
                top: 1
            }
        });

        //Create event object
        var event_object = {
            title: $.trim($(this).text())
        };

        //Store event in dom to be accessed later
        $(this).data('eventObject', event_object);
    });
}

/* initialize the calendar
-----------------------------------------------------------------*/
function initialize_Calendar() {
    $("div[id*=HolidaysCalendar]").fullCalendar({
        header: {
            left: "prev,next today",
            center: "title",
            right: "month"
            //right: "month,agendaWeek,agendaDay"
        },
        firstDay: 1,
        editable: false,
        droppable: false,
        selectable: true,
        selectHelper: true,
        events: "JsonResponse.ashx",
        eventRender: function (calEvent, element, monthView) {
            element.attr('title', calEvent.description);
        },
        dayClick: function (date, allDay, jsEvent, view) {
        },
        eventClick: dialogUpdateEvent,
        eventDrop: function (calEvent, dayDelta, minuteDelta, allDay,
				            revertFunc, jsEvent, ui, view) {
        },
        eventResize: function (calEvent, dayDelta, minuteDelta, revertFunc) {
        }
    });

    //initialize external events
    initialize_external_event('.external-event');
}

<script type="text/javascript" src="<%= live_site %>/Scripts/js/plugins/jquery/jquery.min.js"></script>
<script type="text/javascript" src="<%= live_site %>/Scripts/js/plugins/jquery/jquery-ui.min.js"></script>
<script type="text/javascript" src="<%= live_site %>/Scripts/js/plugins/bootstrap/bootstrap.min.js"></script> 
<script type="text/javascript" src="<%= live_site %>/Scripts/js/plugins/moment.min.js"></script>
<script type="text/javascript" src="<%= live_site %>/Scripts/js/plugins/fullcalendar/fullcalendar.min.js"></script>
&#13;
&#13;
&#13;

我正在使用带aspx页面的asp.net,我一直遇到这个问题:

TypeError:$(...)。fullCalendar不是函数
$(&#34; DIV [ID * = HolidaysCalendar]&#34)。fullCalendar();

所以它基本上对fullCalendar知之甚少。

0 个答案:

没有答案