2017-01-04 3 views
2

正しい場所にいない提示されている私は が、私は.. i received as the response of Ajax call in event Sourceのフルカレンダー搭載のEventSource、日数が

eventSources: 
     [ 

      // your event source 
      { 


       url: '/ajax-load-holidaysExtra',// use the `url` property 
       type: 'POST', 
       datatype: "JSON", 
       data : function() 
       { // a function that returns an object 
        var date = new Date($('#calendar1').fullCalendar('getDate')); 
        month_integer = date.getMonth(); 
        year_integer = date.getFullYear(); 
        return { 
         month: month_integer, 
         year: year_integer 
        } 
       }, 

       error: function() { 
        alert('there was an error while fetching eventsin hol!'); 
       }, 
       color: 'rgba(244, 221, 38, 0.20)', // a non-ajax option 
       textColor: 'blue' // a non-ajax option 

      } 

     ], 

としてデータを取得するが、私はその日を取得し、Ajax呼び出しを通じてのEventSourceにデータをロードしますカレンダーに表示されているものが正しくない場合は、イベントソースから取得する予定の日付の1日または2日前の日付が表示されます。

私は完全なカレンダーに新しくなりました。感謝します

答えて

1

私は

でもデータは形式がカレンダーと大丈夫ではなかった正しい答え...月が2011-04-04として来るべきであるドキュメントのように

events: [ 
    { 
     title: 'Event1', 
     start: '2011-04-04' 
    }, 
    { 
     title: 'Event2', 
     start: '2011-05-05' 
    } 
    // etc... 
], 

を見つけましたが、私のデータではあります2011-4-4だから結果は出るが、完全なカレンダーは別の日を示す。

..これは誰かにとって便利かもしれないので、私はこの質問を残しています。議論のために開いている提案があれば...

関連する問題