이벤트 객체 조작
이벤트 객체 가져오기
이벤트 객체를 가져오려면 getEvent 메서드를 사용합니다:
scheduler.parse([
{id:1, start_date:"2027-05-13 6:00", end_date:"2027-05-13 8:00", text:"Event 1"},
{id:2, start_date:"2027-06-09 6:00", end_date:"2027-06-09 8:00", text:"Event 2"}
]);
...
const eventObj = scheduler.getEvent(1);
//->{id:1, start_date:"2027-05-13 6:00", end_date:"2027-05-13 8:00", text:"Event 1"}
지정된 기간의 이벤트 가져오기
지정된 기간 동안 발생하는 이벤트 컬렉션을 가져오려면 getEvents 메서드를 사용합니다:
const evs = scheduler.getEvents(new Date(2027,1,10),new Date(2027,2,10));
//where evs is an array of events' objects