본문 바로가기

프로그래밍 강의/기타

[콩쌤] FullCalendar Internet Explorer Refresh not working (풀캘린더 인터넷 익스플로어 새로고침 작동 안할 때)

 FullCalendar Internet Explorer Refresh not working

 

지금 다니는 회사에서는 풀캘린더를 사용하는데, 지금까지는 그냥 딱 약간 정적인 데이터들을 보여주는 용도로 사용했어요. 그런데 이번에는 그 캘린더에 보이고 안보이는걸 유동적으로 해줘야합니다.

뭐 다를까 싶었는데 크롬에서는 잘 작동을 하는데 익스플로어에서는 반영이 잘 안되더라구요 T_T

약간 데이터를 한번 불러오면 캐시처럼 남아있는것같은 느낌적인 느낌으로~~~

구글링을 좀 해보니 풀캘린더 자체에서 캐시를 안남기게 하는 기능이 있더라구요!! ㅎㅎ

 


 

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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
$('#calendar').fullCalendar({
                header: {
                    left: 'prev,next today',
                    center: 'title',
                    right: 'month,basicWeek,basicDay'
                },
                defaultDate: new Date(),    // 기준일은 오늘
                navLinks: true
                editable: true,
                eventLimit: true
                eventRender: function (eventObj, $el) {
                    $el.popover({
                        title: eventObj.title,
                        content: eventObj.description,
                        trigger: 'hover',
                        placement: 'top',
                        container: 'body',
                        timeFormat: 'h:mmtt'
                    });
                },
                events: function (start, end, timezone, callback) {
                    $.ajax({
                        url: '원하는 경로',
                        type: "GET",
                        dataType: "JSON",
                        cache: false//CHANGED 이부분 추가해주기!
                        success: function (result) {
                            var events = [];
                            $.each(result, function (i, data) {
                                events.push(
                                    {
                                        title: data.CampaignName,
                                        description: data.toolTip,
                                        start: data.startDate,
                                        end: data.endDueDate,
                                        color: data.color,
                                        url: data.url,
                                        html: true
                                    });
                            });
                            callback(events);
                        }
                    });
                },
                eventClick: function (event) {
                    if (event.url) {
                        window.open(event.url, "_blank");
                        return false;
                    }
                }
            }); //fullcalendar
 
http://colorscripter.com/info#e" target="_blank" style="color:#e5e5e5; text-decoration:none">Colored by Color Scripter

 


 

29번줄에 제가 볼드처리해둔

cache: false//CHANGED 이부분 추가해주기!

이 부분을 처음에 이벤트 호출하는 부분에 추가해주시면 됩니다!