달력 이벤트를 문법적으로 설정하는 데 문제가 있습니다.fullCalendar 프로그래밍 방식으로 이벤트를 설정하는 방법
사용자가 드롭 다운을 사용하여 이벤트를 표시 할 클라이언트를 선택할 수있는 페이지가 있습니다. Ajax 호출을 통해 이벤트를 요청합니다. 그리고이 모든 것이 좋아 보인다. 하지만 fullCalendar에서 이벤트를 설정하는 데 문제가 있습니다. 이것은 AJAX 응답의 덤프입니다
success: function(resp){
var r = resp.output;
console.dir(r);
jQuery('#student').html(r.studentname);
jQuery('#calendar').fullCalendar('removeEvents'); // <= This works
jQuery('#calendar').fullCalendar('events', r.events); // <= This doesn't
}
:
이
는 이벤트를 설정하려면 코드입니다events "[{
id: 1,
title: 'Acupuncture',
start: new Date(2013, 5, 29, 10, 00),
end: new Date(2013, 5, 29, 10, 30),
allDay: false
}
,
{
id: 2,
title: 'Acupuncture',
start: new Date(2013, 6, 30, 10, 00),
end: new Date(2013, 6, 30, 10, 30),
allDay: false
}
,
{
id: 3,
title: 'Chiropractor',
start: new Date(2013, 6, 31, 11, 00),
end: new Date(2013, 6, 31, 11, 15),
allDay: false
}
]
"
id "1"
studentname "Tarah Yates"
나는이 이렇게하는 방법에 대한 예를 찾을 수 없습니다
내가 제대로하고 있는지 잘 모르겠다.
방금 이벤트 목록 주변의 인용문을 보았습니다. 아마도 그게 문제입니까?
이것이 문제가되지 않는다면 아무도 왜 작동하지 않는지에 대한 생각을 갖고 있습니까?
시도 eventsources의 배열이있는 경우 이벤트 추가 후 rerenderEvents 메소드 –