Web/fullCalendar
Full calendar 선택된 이벤트의 하이라이트 기법
RAY.D
2015. 4. 28. 09:30
Full calendar 선택된 이벤트의 하이라이트 기법
var calendar = $('#calendar').fullCalendar ({
---
, eventClick: function (event, jsEvent, view) {
}
eventClick 내에
event.backgroundColor = 'darkblue'; $('#calendar').fullCalendar('rerenderEvents');
로
색상변화를 설정할 수 있다.
그런데 문제는...
다른 이벤트를 클릭하면, 좀 전에 클릭한 이벤트가 설정한 상태로 그대로 남아있다.
이게 의도한거라면 상관없지만, 클릭하는 거만 하이라이트 되기를 바란다면...
eventRender 함수에서 원상복귀시켜줘야 한다.
, eventRender: function (event, element) { //클릭되었던 이벤트 포함하여 모두 원래 색상으로 돌려놓음 event.backgroundColor = 'green';