fixed weekStart bug
This commit is contained in:
parent
57490950ae
commit
6b9f6de931
|
@ -33,14 +33,14 @@
|
|||
start: "2009-05-18"
|
||||
});*/
|
||||
|
||||
$('#calendar').fullCalendar("removeEvent", 3);
|
||||
//$('#calendar').fullCalendar("removeEvent", 3);
|
||||
|
||||
/*var events = $('#calendar').fullCalendar('getEventsById', 2);
|
||||
var events = $('#calendar').fullCalendar('getEventsById', 2);
|
||||
var ev1 = events[0];
|
||||
ev1.title = "yo";
|
||||
ev1.start = '2009-05-14';
|
||||
ev1.end = '2009-05-16';
|
||||
$('#calendar').fullCalendar('updateEvent', ev1);*/
|
||||
$('#calendar').fullCalendar('updateEvent', ev1);
|
||||
|
||||
});
|
||||
|
||||
|
@ -79,8 +79,7 @@
|
|||
end: new Date(y, m, 29),
|
||||
url: "http://facebook.com/"
|
||||
}
|
||||
],
|
||||
rightToLeft: false
|
||||
]
|
||||
});
|
||||
|
||||
});
|
||||
|
|
|
@ -108,6 +108,8 @@
|
|||
gotoMonth: gotoMonth,
|
||||
refresh: updateMonth,
|
||||
|
||||
// event crud
|
||||
|
||||
addEvent: function(event) {
|
||||
events.push(normalizeEvent(event));
|
||||
clearEvents();
|
||||
|
@ -173,6 +175,26 @@
|
|||
}
|
||||
}
|
||||
return res;
|
||||
},
|
||||
|
||||
// event source crud
|
||||
|
||||
addEventSource: function(src) {
|
||||
eventSources.push(src);
|
||||
clearEvents();
|
||||
renderEvents();
|
||||
},
|
||||
|
||||
removeEventSource: function(src) {
|
||||
var newSources = [];
|
||||
for (var i=0; i<eventSources.length; i++) {
|
||||
if (src !== eventSources[i]) {
|
||||
newSources.push(eventSources[i]);
|
||||
}
|
||||
}
|
||||
eventSources = newSources;
|
||||
clearEvents();
|
||||
renderEvents();
|
||||
}
|
||||
|
||||
});
|
||||
|
@ -236,7 +258,7 @@
|
|||
|
||||
clearTime(date);
|
||||
start = cloneDate(date);
|
||||
addDays(start, -start.getDay() + weekStart);
|
||||
addDays(start, -((start.getDay() - weekStart + 7) % 7));
|
||||
end = cloneDate(date);
|
||||
addMonths(end, 1);
|
||||
addDays(end, (7 - end.getDay() + weekStart) % 7);
|
||||
|
|
Loading…
Reference in a new issue