Weekly.js 844 Bytes
Newer Older
Kim, Subin's avatar
Kim, Subin committed
1
import moment from 'moment';
Kim, Subin's avatar
Monthly    
Kim, Subin committed
2
3
import FullCalendar from '@fullcalendar/react';
import dayGridPlugin from '@fullcalendar/daygrid';
Kim, Subin's avatar
Kim, Subin committed
4
5
6
import interactionPlugin from "@fullcalendar/interaction";
import bootstrapPlugin from '@fullcalendar/bootstrap';
import '@fortawesome/fontawesome-free/css/all.css';
Kim, Subin's avatar
Monthly    
Kim, Subin committed
7
8
9
10

const Weekly = () => {
    return (
        <FullCalendar
Kim, Subin's avatar
Kim, Subin committed
11
            plugins={[dayGridPlugin, interactionPlugin, bootstrapPlugin]}
Kim, Subin's avatar
Monthly    
Kim, Subin committed
12
13
            initialView="dayGridWeek"
            headerToolbar={{
Kim, Subin's avatar
Kim, Subin committed
14
15
16
17
18
                start: 'title',
                center: '',
                end: ''
            }}
            titleFormat={(date) => {
Kim, Subin's avatar
수정    
Kim, Subin committed
19
                // if (date.date.)
Kim, Subin's avatar
Kim, Subin committed
20
21
                console.log("date==",date)
                return date.date.year + "" + (date.date.month + 1) + "";
Kim, Subin's avatar
Monthly    
Kim, Subin committed
22
23
24
25
26
27
            }}
        />
    )
}

export default Weekly