Vibin TV
Vibin TV

Reputation: 832

Issue in showing events accurately in fullcalendar Month view

i am using FullCalendar v2.7.1 jquery plugin.

It is not showing the events correctly in month view. In day view and week view it shows events accurately. I have passed events with datetime in ISO8601 format (2016-08-06T00:00:00).

I have an event start at 2016-08-02T07:00:00 and end at 2016-08-04T07:00:00 But in month view the event occupied in only 2 days (August 02 - August 03) instead of 3 days (August 02 - August 04)

But when i changed my end date to 2016-08-04T09:00:00 it occupied to 3 days.

My js code for full calendar is

$('#calendar').fullCalendar({
    editable: false,
    droppable: false,
    events:{
        url: "common/calendar/show_events",
        type: 'POST'
    }
});

i have tried allDayDefault to false also.

Is there any solution to solve this?

Upvotes: 2

Views: 986

Answers (1)

mukund
mukund

Reputation: 2433

This is just issue of your timezone, try to match timezone with your pc timezone I always prefer to pass dates and time using unix timestamps

Ex: start: 1470747280000

If it is not fixed by timestamp then look for following settings:

nextDayThreshold: '00:00:00'

Following link may help you to understand timezone: http://fullcalendar.io/docs/timezone/timezone/

Logically it is three days between 2016-08-02T07:00:00 and 2016-08-04T09:00:00 2nd Aug, 3rd Aug and on 4th Aug 9 hours So, it would show on 4th august

Upvotes: 1

Related Questions