Calendar.js 843 Bytes
Newer Older
Lee Jin Ju's avatar
Lee Jin Ju committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import React, { useState, useEffect } from 'react';
import Calendar from 'tui-calendar';
import "tui-calendar/dist/tui-calendar.css";

const calendar = new Calendar('#calendar', {
    defaultView: 'week',
  //   useCreationPopup: true,
  //   useDetailPopup: true
  });
  
  calendar.createSchedules([
      {
        id: '1',
        calendarId: 'Major Lecture',
        title: '자료 구조',
        category: 'time',
        start: '2018-11-20T10:30:00',
        end: '2018-11-20T12:30:00'
      },
      {
        id: '2',
        calendarId: 'General Lecture',
        title: '건강과 영양',
        category: 'time',
        dueDateClass: '',
        start: '2018-11-20T14:30:00',
        end: '2018-11-20T16:30:00',
        isReadOnly: true // schedule is read-only
      }
    ]);

calendar.render();
    
export default Calendar