1
私は現在、作業中のプロジェクトにfullcalendarを統合しようとしています。私はselect:callbackでいくつかのエラーに遭遇しています.Ajaxリクエストを送信しようとするとエラーが発生します。私の選択:コールバックは、次のようになります。フルカレンダー選択:コールバックJavascriptエラー
select: function(start, end, allDay){
var title = prompt('Event Title: ');
if(title) {
var start = jQuery.fullCalendar.formatDate(start, "yyyy-MM-dd HH:mm:ss");
var end = jQuery.fullCalendar.formatDate(end, "yyyy-MM-dd HH:mm:ss");
$.ajax({
url: '/wp-admin/admin-ajax.php',
data: {
action: 'add_itinerary_event',
JSToken: jQuery("#JSToken").val(),
GuestID: jQuery("#GuestID").val(),
Title: title,
Start: start,
End: end,
AllDay: allDay
},
type: 'post',
success: function(json){
alert('Added Successfully');
}
});
itinerarycalendar.fullCalendar('renderEvent', {
title: title,
start: start,
end: end,
allDay: allDay
},
true);
}
itinerarycalendar.fullCalendar('unselect');
},
期間を選択することで、カレンダーにイベントを追加する場合は、Chromeのコンソールは次のことを記録します
fitbscripts.jsをクリックjquery-1.12.0.js?ver=4.7.4:4 Uncaught TypeError: Illegal invocation
at e (jquery-1.12.0.js?ver=4.7.4:4)
at cc (jquery-1.12.0.js?ver=4.7.4:4)
at cc (jquery-1.12.0.js?ver=4.7.4:4)
at cc (jquery-1.12.0.js?ver=4.7.4:4)
at cc (jquery-1.12.0.js?ver=4.7.4:4)
at cc (jquery-1.12.0.js?ver=4.7.4:4)
at Function.n.param (jquery-1.12.0.js?ver=4.7.4:4)
at Function.ajax (jquery-1.12.0.js?ver=4.7.4:4)
at Et.function.e.constructor.select (fitbscripts.js?ver=4.7.4:76)
at constructor.publiclyTrigger (fullcalendar.min.js?ver=4.7.4:9)
(自分のコードの場所)は$ .ajax行を指しますが、それ以上の情報は提供しません。 Safariでは
は、以下の情報が与えられます。
[Error] TypeError: Can only call HTMLElement.click on instances of HTMLElement
click (jquery-1.12.0.js:4:24813)
e (jquery-1.12.0.js:4:24813)
cc (jquery-1.12.0.js:4:24698)
cc (jquery-1.12.0.js:4:24722)
cc (jquery-1.12.0.js:4:24722)
cc (jquery-1.12.0.js:4:24722)
param (jquery-1.12.0.js:4:25060)
ajax (jquery-1.12.0.js:4:20919)
select (fitbscripts.js:76)
publiclyTrigger (fullcalendar.min.js:9:16488)
publiclyTrigger (fullcalendar.min.js:8:30679)
triggerSelect (fullcalendar.min.js:9:8211)
reportSelection (fullcalendar.min.js:9:8156)
interactionEnd (fullcalendar.min.js:7:19556)
trigger (fullcalendar.min.js:7:7856)
handleInteractionEnd (fullcalendar.min.js:7:6113)
handleInteractionEnd (fullcalendar.min.js:7:11377)
endInteraction (fullcalendar.min.js:7:6045)
d (jquery-1.12.0.js:2:3862)
n (fullcalendar.min.js:6:31915)
dispatch (jquery-1.12.0.js:3:12350)
handle (jquery-1.12.0.js:3:9077)
trigger (jquery-1.12.0.js:3:11477)
triggerHandler (jquery-1.12.0.js:3:18984)
trigger (fullcalendar.min.js:7:145)
handleMouseUp (fullcalendar.min.js:7:13137)
d (jquery-1.12.0.js:2:3862)
dispatch (jquery-1.12.0.js:3:12350)
handle (jquery-1.12.0.js:3:9077)
誰もがこれを引き起こす可能性のあるものを知っていますか?私はここで何が起こっているのかを調べるために円で回っているようです。
こんにちは!どのjquery、fullcalendarのバージョンを使用していますか? – LakiGeri
Fullcalendar v3.4.0、jQuery 1.12.0 –
@LakiGeri jQuery 2.1.0に更新しました。fullcalendar 2.0+が必要ですが、同じエラーメッセージが表示されています。 –