I implement fullcalendar and am struggling with the time zone problem.
Here is the code:
$('#calendar').fullCalendar({
header: h,
defaultView: 'agendaWeek',
slotMinutes: 15,
editable: true,
lang: 'pl',
timezone: 'Europe/Warsaw',
droppable: true,
drop: function(date, allDay) {
var originalEventObject = $(this).data('eventObject');
var copiedEventObject = $.extend({}, originalEventObject);
copiedEventObject.start = date;
var endDate = new Date(date);
endDate.setMinutes(endDate.getMinutes() + 70);
copiedEventObject.end = endDate;
alert(date);
alert(endDate);
copiedEventObject.className = $(this).attr("data-class");
$('#calendar').fullCalendar('renderEvent', copiedEventObject, true);
if ($('#drop-remove').is(':checked')) {
$(this).remove();
}
},
});
If I create a new event by dropping it, I get a date with the GMT time zone, where, when I need to set the CET, please help fix the event time zone setting.
source
share