2012-01-11 5 views
0

그래서 allDay 이벤트가 아닌 이벤트를 추가하면 allDay 이벤트로 설정됩니다.fullcalendar addDay not working

JSON 코드 나는이 (가) 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"}] 

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 
    },