create (static)

달력 객체를 생성하고 반환합니다.
생성한 달력 객체를 사용하여 render() Method를 호출해야 달력이 실제로 DOM에 그려집니다.

Syntax

object IBCalendar.create(id, el, options);

Parameters

Name Type Required Description
id string 필수 달력 객체의 id
el HTMLElement 필수 달력을 생성할 부모 html 컨테이너 div객체
options object 필수 달력 생성 정보를 갖고있는 json 객체

Return Value

object

Example

<body>
   <div id="calendar-container"/>
</body>
const id = "calendar1",
      parentEl = document.getElementById("calendar-container"),
      options = {
         headerToolbar: {
             left: "today prev next",
             center: "title",
             right: "dayGridMonth,timeGridWeek,timeGridDay,listMonth"
         }
};

const objCalendar = IBCalendar.create(
      id,
      parentEl,
      options
);

// 실제 달력을 DOM에 그려주는 API
objCalendar.render();

Read More

Since

product version desc
core 1.5.0.0 기능 추가