I'm using FullCalendar and Date.js to set up a weekly agenda. I'm also using the answer from fullCalendar jQuery, repeat every monday? for recurring events - but I'm struggling to convert these events to a specific time, rather than all day.
var date = new Date();
var d = date.getDate();
var m = date.getMonth();
var y = date.getFullYear();
$('#calendar').fullCalendar({
defaultView: 'agendaWeek'
});
// adding a every monday and wednesday events:
$('#calendar').fullCalendar( 'addEventSource',
function(start, end, callback) {
// When requested, dynamically generate virtual
// events for every monday and wednesday.
var events = [];
for (loop = start.getTime();
loop <= end.getTime();
loop = loop + (24 * 60 * 60 * 1000)) {
var test_date = new Date(loop);
if (test_date.is().monday()) {
events.push({
title: 'Meeting',
start: test_date
});
}
} // for loop
// return events generated
callback( events );
}
);
I've tried changing the "if" to check for time as well with no luck and I've tried setting the time of the test_date variable, without success.
I appreciate the help.