FullCalendar在月视图中显示事件,但不显示日和周视图? [英] FullCalendar showing event in month view but not day and week view?
问题描述
我正在使用FullCalendar从json订阅源提取事件。然而,我遇到了一个问题。
日历在月视图中显示我的活动正好,但是在日视图中显示日/星期和我的初始化fullcalendar看起来像这样:
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', 'b $ b buttonText:{
今天:'我dag',
月:'Måned',
星期:'Uge',
day:'Dag '
},
周末:假,
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);
我的提要返回以下json:
<$ p>
[{id:7,title:Elias(10:00),start:1359108000,end:1359109800,url: \ / tidsbestillinger\ / edit\ /}]
为什么会出现这种情况?
解决!必须设置
allDayDefault:false,
同时初始化FullCalendar。
或者我可以设置
<$ p $在JSON中使用p> allDay = false
更容易。
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.
这篇关于FullCalendar在月视图中显示事件,但不显示日和周视图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!