TyForHelpDude
TyForHelpDude

Reputation: 5002

FullCalendar ignore timezone

I already set;

var calendar = $('#calendar').fullCalendar({
            axisFormat: 'HH:mm',
            timezone:false,
            ignoreTimezone: true,...

So I expect it use current local time settings but its not.. when I select a time in calender event object date is 2 hours ahead.. I think its because my timezone is UTC+2 but I dont want it add anything I want whatever I select in calendar.. here how it look.. (I select Monday 23:30 PM, but event date is: Tuesday 01:30 AM ) enter image description here

I see the browser that that object(Moment) has a property _isUTC:true.. I think this is my problem but how can I set it to false ?

Upvotes: 6

Views: 7955

Answers (3)

Mus
Mus

Reputation: 1

I changed timeZone:'local' by timezone:'local' with a z lowerCase and it worked

Upvotes: 0

Alex Wang
Alex Wang

Reputation: 29

Instead of using "timezone: 'local'", sometime you may want to use "moment.local()" on an exact moment object to set its flag "isUTC" as false dynamically.

Upvotes: 2

Chintan Mirani
Chintan Mirani

Reputation: 1465

You can set local to timezone in your fullcalendar configuration.

timezone:'local',

It works!

Upvotes: 13

Related Questions