Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/418.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript google日历与完整日历io同步_Javascript_Jquery_Fullcalendar - Fatal编程技术网

Javascript google日历与完整日历io同步

Javascript google日历与完整日历io同步,javascript,jquery,fullcalendar,Javascript,Jquery,Fullcalendar,我在完整日历io中使用jquery和php开发了事件条目。现在我想添加谷歌日历同步与此。我该怎么做?我已经阅读了文件。在events参数中,我必须添加事件: { googleCalendarId: 'abcd1234@group.calendar.google.com' } 但是我已经添加了一个php文件(load.php)参数。我怎样才能同时使用它们呢 $(document).ready(function() { var calendar = $('#calendar').fullCalen

我在
完整日历io
中使用
jquery
php
开发了事件条目。现在我想添加谷歌日历同步与此。我该怎么做?我已经阅读了文件。在events参数中,我必须添加事件:

{ googleCalendarId: 'abcd1234@group.calendar.google.com' }
但是我已经添加了一个
php
文件(
load.php
)参数。我怎样才能同时使用它们呢

$(document).ready(function() {
var calendar = $('#calendar').fullCalendar({
editable:true,
header:{
 left:'prev,next today',
 center:'title',
 right:'month,agendaWeek,agendaDay'
},
events: 'load.php',
selectable:true,
selectHelper:true,
select: function(start, end, allDay)
{
var start = $.fullCalendar.formatDate(start, "Y-MM-DD");
var end = $.fullCalendar.formatDate(end, "Y-MM-DD");

 $("#form1").toggle();

//alert(title);
     $("#submit").click(function() {

var title = prompt("Enter Event Title");
     if(title)
 {

  var tname="Rayhan";
  var course=document.getElementById("course").value;
  console.log(course);
  var email="showrov@test.com";
  var descrip=document.getElementById("descrip").value;
  $.ajax({
   url:"insert.php",
   type:"POST",
   data:{title:title, start:start, end:end, tname:tname, course:course, 
   email:email, descrip:descrip},
   success:function()
   {
    calendar.fullCalendar('refetchEvents');
    alert("Added Successfully");
   }
  });
 }//
 })


},

您可以使用事件源功能来完成此操作。这允许您为日历事件定义多个数据源

简单地替换

events: 'load.php'

现在,您的日历将从两个位置加载事件。这里有记录:

您还必须确保执行中记录的其他设置步骤,以使您的Google日历提要正常工作

eventSources: [
  'load.php',
  { googleCalendarId: 'abcd1234@group.calendar.google.com' }
]