2012-01-11 10 views
0

したがって、allDayイベントではないイベントを追加すると、それもallDayイベントとして設定されているようです。fullcalendar addDay not working

JSONコード

[{"id":"1","agent_id":"1","customer_id":"0","title":"Doctors","text":"This is a test calendar","start":"2012-01-12 10:20:00","end":"2012-01-12 11:00:00","allDay":"false"}] 

私は私の質問は、終日のイベントであってはならない事象が時間

として表示するために取得する方法であるJSONをロードするには、次の

eventSources: [ 

           // your event source 
           { 
            url: 'system/fullcalendar-1.5.2/demos/json-events.php', 
            type: 'POST', 

            error: function() { 
             alert('there was an error while fetching events!'); 
            }, 
            //color: 'Light-Blue', // a non-ajax option 
            textColor: 'white' // a non-ajax option 
           }, 

           { 
            url: 'system/classes/core.php?task=calendar&q=fetch&userid='+userid, 
            type: 'POST', 

            error: function() { 
             alert('there was an error while fetching events!'); 
            }, 
            color: 'orange', // a non-ajax option 
            textColor: 'white' // a non-ajax option 
           } 

          // any other sources... 

         ], 

を使用しています

答えて

2

私は問題はあなたがallDayのブール値を引用符で囲んでいることだと思います。 docsは次のように言っています。真偽の前後に引用符を含めないでください。この値は文字列ではありません!

どちらかあなたのJSONのリターンを持っている:

"allDay": false 

か、JSONからそれを削除し、ソースのallDayDefaultプロパティを設定できます

eventSources: [ 

    // your event source 
    { 
    url: 'system/fullcalendar-1.5.2/demos/json-events.php', 
    type: 'POST', 
    allDayDefault: false, 
    error: function() { 
         alert('there was an error while fetching events!'); 
         }, 
    //color: 'Light-Blue', // a non-ajax option 
    textColor: 'white' // a non-ajax option 
    },