FullCalendar.io

김승우·2020년 10월 26일
0

TIL

목록 보기
35/68

FullCalendar.io

1. 재 렌더링

: calendar.destroy() & calendar.render()

2. 이벤트 리스트 추가 => 이벤트 객체 하나 추가할 경우

: https://fullcalendar.io/docs/Calendar-addEvent
: calendar.addEvent({
title : "금요일", // 이벤트 제목
start : "2020-09-29" //달력 날짜에 매핑
})

3. 이벤트 소스 추가 => 이벤트 여러개 추가시(이벤트리스트 배열로 전달할 경우)

: calendar.addEventSource()

: calendar.addEventSource({
id : "", //아이디가 다를 경우, 같은 날짜여도 다른 이벤트 그룹으로 생성된다.
events : [...],
})

4. Event Object

: https://fullcalendar.io/docs/event-object

5. Event Content : 이벤트 템플릿 관련 문법

: https://fullcalendar.io/docs/content-injection
: function(arg) { ... }
:arg.event.title로 이벤트 오브젝트에 접근가능

5. calendar.next(), calendar.prev() 달력 다음달/이전달 이동

6. 헤더툴바에 커스텀 버튼 만들기

: https://fullcalendar.io/docs/customButtons

7. 이벤트 엘리먼트에 클래스 주기

: https://fullcalendar.io/docs/classname-input

8. 헤더 툴바

: https://fullcalendar.io/docs/headerToolbar

9. events 함수로 받기 => ajax이용

: https://fullcalendar.io/docs/events-function

10. events 내용 수정 : title, date, start, end ...

: https://fullcalendar.io/docs/Event-setProp
: https://fullcalendar.io/docs/Event-setResources
: https://fullcalendar.io/docs/resourceChange

11. 셀 클릭, 셀렉트 이벤트 설정

: https://fullcalendar.io/docs/select-callback

12. 달력 initialView change

: https://fullcalendar.io/docs/initialView
: https://fullcalendar.io/docs/Calendar-changeView

var arr = calendar.getEvents(); //이벤트 리스트 가져옴
arr[0].setProp("title", []);            // 이벤트 리스트 첫번쨰 요소 타이틀 값 변경
profile
사람들에게 좋은 경험을 선사하고 싶은 주니어 프론트엔드 개발자

0개의 댓글