최신 Fullcalendar 버전 (2.2.3)을 사용하도록 앱을 업데이트하고 있습니다. 나는 1.6.4를 사용하고 있었다.Fullcalendar를 2.2.3으로 업데이트 한 후 런타임 오류가 발생했습니다.
현재 버전으로 업데이트하면 fullcalendar가 이벤트 데이터 검색을 준비 할 때 런타임 오류가 발생합니다. 아래 함수에 도달하면 rangeStart 및 rangeEnd 변수는 null이고 .clone() 메서드가 적용될 때 null 참조가 생성됩니다. 다음은 오류가 발생한 fullcalendar.js (줄 1401에서 시작) 함수입니다. 여기
function _fetchEventSource(source, callback) {
var i;
var fetchers = fc.sourceFetchers;
var res;
for (i=0; i<fetchers.length; i++) {
res = fetchers[i].call(
t, // this, the Calendar object
source,
rangeStart.clone(), <== rangeStart is null and causes null reference error here
rangeEnd.clone(),
options.timezone,
callback
);
if (res === true) {
// the fetcher is in charge. made its own async request
return;
}
else if (typeof res == 'object') {
// the fetcher returned a new source. process it
_fetchEventSource(res, callback);
return;
}
}
달력 개체를 내보기
$('#calendar').fullCalendar({
editable: false,
eventSources: [
{
url: '@Url.Action("PullCalendarEvents")',
type: 'POST',
error: function() {
//alert('there was an error while fetching events!');
presentErrorPopup('fetch');
}
}
]
});
달력이 탭에 정의하는 방법이다. 탭을 선택하면 달력을 표시하기 위해 호출되는 선입니다.
$('#calendar').fullCalendar('refetchEvents')
일정 개체를 정의하거나 호출하는 방식을 변경해야합니까?
이것은 순수한 JavaScript이며 C#과 아무 관련이 없습니다. 그에 따라 태그를 업데이트했습니다. – PoweredByOrange
사실 코드는 JavaScript이지만 C# 응용 프로그램 내에서 사용하고 있습니다. 그걸 준거야? – mcolegro
아니, 나는 downvote하지 않았다. 태그를 편집했습니다. – PoweredByOrange