AUI: problem with providing events in month view
The Liferay calendar portlet uses the AUI scheduler. I got the following problem:
I created the following two events on the same day that starts on the weekend (Sunday) and ends the next day (Monday) (the first day of the next week).
Event-A: start time: 12:10, Sunday end: 23:59, Monday
Event-B: start time: 12:00, Sunday end: 23:59, Monday
Ideally, both events should take place on Sunday and Monday. But in the planner (month) look at it, Event-A only covers Mondays and Events-B only covers Sunday and Monday, which is the correct rendering.
Anyone have an idea on this?
I have created a sample script that will be helpful for understanding this: http://jsfiddle.net/RU5xw/41/
YUI().use(
'aui-scheduler',
function (Y) {
var events = [{
content: 'Event A',
endDate: new Date(2013, 1, 17, 4),
reminder: false,
startDate: new Date(2013, 1, 16, 13)
}, {
content: 'Event B',
endDate: new Date(2013, 1, 17, 4),
reminder: false,
startDate: new Date(2013, 1, 16, 12)
}];
var agendaView = new Y.SchedulerAgendaView();
var dayView = new Y.SchedulerDayView();
var eventRecorder = new Y.SchedulerEventRecorder();
var monthView = new Y.SchedulerMonthView();
var weekView = new Y.SchedulerWeekView();
new Y.Scheduler({
activeView: monthView,
boundingBox: '#myScheduler',
date: new Date(2013, 1, 4),
eventRecorder: eventRecorder,
items: events,
render: true,
views: [dayView, weekView, monthView, agendaView]
});
});
+3
source to share