FullCalendar showing event in month view but not day and week view?

I'm working with FullCalendar fetching events from a json feed. However, I've run into a problem.

The calendar shows my event just fine in the month view, but when going to the day/week in day-view and week-view, the even is not shown?

My initialization of fullcalendar looks like this:

var options = {
    header: {
        left: 'prev, next',
        center: 'title',
        right: 'month,agendaWeek,agendaDay'
    },
    allDaySlot: false,


    monthNames: ["Januar","Februar","Marts","April","Maj","Juni","Juli", "August", "September", "Oktober", "November", "December" ], 
    monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun','Jul','Aug','Sep','Okt','Nov','Dec'],
    dayNames: ['Søndag',  'Mandag', 'Tirsdag', 'Onsdag', 'Torsdag', 'Fredag', 'Lørdag'],
    dayNamesShort: ['Søn','Man','Tir','Ons','Tor','Fre','Lør'],
    buttonText: {
        today: 'I dag',
        month: 'Måned',
        week: 'Uge',
        day: 'Dag'
    },
    weekends: false,

    defaultView: 'agendaWeek',
    events: '/feed/',

    firstHour: 8,
    slotMinutes: 20,
    defaultEventMinutes: 120,
    axisFormat: 'HH:mm',
    timeFormat: {
        agenda: 'H:mm{ - h:mm}'
    },
    minTime: 8,
    maxTime: 16
};

$('#calendar-holder').fullCalendar(options);

My feed returns the following json:

[{"id":"7","title":"Elias  (10:00)","start":1359108000,"end":1359109800,"url":"/tidsbestillinger/edit/"}]

Any ideas why this is happening?


Solved! Had to set

allDayDefault: false, 

while initializing FullCalendar.

Alternatively I could have set

allDay = false

in the JSON - but doing it globally is much easier.


Also make sure that event length must be enough that it can be displayed in slotDuration. eg my slotDuration is 15 minutes, my event only displayed if it has minimum 2 minutes duration. 在这里输入图像描述

链接地址: http://www.djcxy.com/p/81158.html

上一篇: 在一个月或一年的视图内显示事件点击的日视图

下一篇: FullCalendar在月视图中显示事件,但不显示日和周视图?