arun arun - 2 months ago 14
Ajax Question

FullCalender:- On load events time is not correct

On loading/fetching events, its adds 9 minutes extra in the actual time.

In the database this is 2016-09-22 08:00:00 but on calendar this is 2016-09-22 08:09:00).

We are using below code for setting parameters:-

$('#calendar').fullCalendar({
events: json_events,
utc: true,
header: {
left: 'prev,next today',
center: 'title',
right: 'month,agendaWeek'
},
defaultView: 'month',
editable: true,
droppable: true,
slotDuration: '01:00:00', //'00:30:00' for 30 minutes
displayEventTime: true,
axisFormat: 'HH:mm',
timeFormat: 'hh:mm',
allDaySlot: false,
timezone: 'Asia/Kolkata',
});

Answer

I just check your code this is fine. I think you are doing some customization in the eventRender function.

If you are using format() function then please use like below:-

event.start.format("YYYY-MM-DD HH:mm:ss")

I am sure in your case you are using like below:-

event.start.format("YYYY-MM-DD HH:MM:SS")

Please tell me if this helps :)

Comments