
<apex:page controller="Calendar" action="{!pageLoad}" standardStylesheets="false">
<link href="{!$Resource.fullCalendarCSS}" rel="stylesheet" />
<link href="{!$Resource.fullCalendarPrintCSS}" rel="stylesheet" media="print" />
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>
<script src="{!URLFOR($Resource.FullCalendar,'lib/jquery.min.js')}"></script>
<script src="{!URLFOR($Resource.FullCalendar,'lib/jquery-ui.custom.min.js')}"></script>
<script src="{!URLFOR($Resource.FullCalendar,'fullcalendar/fullcalendar.min.js')}"></script>
<script src="{!URLFOR($Resource.FullCalendar,'lib/moment.min.js')}"></script>
<script type="text/javascript">
var j$ = jQuery.noConflict(true);
j$(function() {
j$('⌗calendar').fullCalendar({
header: {
left: 'prev,next today',
center: 'title',
right: 'month.agendaWeek.agendaDay'
},
editable: false,
events:
[
<apex:repeat value="{!events}" var="e">
{
title: "{!e.title}",
start: "{!e.startString}",
end: "{!e.endString}",
url: "{!e.url}",
allDay: "{!e.allDay}",
className: "{!e.className}"
},
</apex:repeat>
{
}
]
});
});
</script>
<style>
⌗cal-options {float:left;}
⌗calendar {margin-top:20px;}
⌗calendar a:hover {color:⌗fff !important;}
.fc-event-inner {padding:3px;}
.course {background:⌗56458c;border-color:⌗56458c;}
</style>
<apex:sectionHeader title="Cursos Calendar"/>
<div id='calendar'></div>
</apex:page>
Controller:
If you could let me know what I can do to fix this, I would be super grateful! Thank youpublic class Calendar {
public List<CalEvent> events {get; set;}
private static String dtFormat = 'EEE, d MMM yyyy HH:mm:ss z';
public Calendar() {
}
public PageReference pageLoad() {
events = new List<CalEvent>();
for (Curso__c cur: [SELECT Name,
Fecha_de_Inicio__c,
Fecha_de_Finalizacion__c,
Frecuencia__c,
D_as__c
FROM Curso__c
]) {
List<Date> dates = CalculateDates.getDates(cur.Fecha_de_Inicio__c,
cur.Fecha_de_Finalizacion__c,
cur.D_as__c,
cur.Frecuencia__c
);
for (Date dat: dates) {
CalEvent course = new CalEvent();
course.title = cur.Name;
course.allDay = true;
DateTime d = (DateTime) dat;
course.startString = d.format(dtFormat);
course.endString = null;
course.url = '/' + cur.Id;
course.className = 'course';
events.add(course);
}
}
return null;
}
public class CalEvent {
public String title {get; set;}
public Boolean allDay {get; set;}
public String startString {get; set;}
public String endString {get; set;}
public String url {get; set;}
public String className {get; set;}
}
}

I think there is issue with the date formatting or date zone for the organization.if you have a solution plz forward or paste in comments.