events doesnt show start to end
for some reason I cant get my events to have start and end on them except for the first event that shows开发者_如何转开发 during recurrence. Does anyone have any idea why this is so? I have a working example that shows what I'm talking about.
http://jsbin.com/usori3/11/edit
Here is how to make each event 5 days long.
while (meeting <= end) {
var d = new Date();
d.setDate(meeting.getDate() + 4);
events.push({
id: 2,
title: "Monday Meeting",
start: new Date(meeting.valueOf()),
end: d,
allDay: false
});
// increase by one week
meeting.setDate(meeting.getDate() + 7);
}
All the events have the same end date of Aug 6th.. So the events are:
Aug 2nd - Aug 6th (Ok.. Displays a 5 day event)
Aug 9nd - Aug 6th (End Date is before the start Date, displays one day on the start date)
Aug 16nd - Aug 6th (End Date is before the start Date, displays one day on the start date)
Aug 23nd - Aug 6th (End Date is before the start Date, displays one day on the start date)
Aug 30nd - Aug 6th (End Date is before the start Date, displays one day on the start date)
If you add an alert inside your meeting loop you can see the end date that is being added.
while (meeting <= end) {
events.push({
id: 2,
title: "Monday Meeting",
start: new Date(meeting.valueOf()),
end: endmeeting,
allDay: false
});
<b>alert(endmeeting);</>
// increase by one week
meeting.setDate(meeting.getDate() + 7);
}
精彩评论