FullCalender TimeZone

sunnyjey

Active Member
I'm using jDate for Date Element with Default Time set as UTC. In fullcalender, the timestamp of jDate is showing myServer Local time NOT UTC (maybe normal behaviour). Is there anyway to way to override and display UTC time on fullCalendar visualisation plugin ?

I tried placing "timeZone": UTC (also tried "timeZone": 'UTC' AND "timeZone": 'America/New_York') in the Option of FullCalender, but it is not working. Ref: https://fullcalendar.io/docs/timeZone

Secondly, as per recent Github commit, there is new option of Custom Query. I am just curious how to use this Custom query, maybe you can provide some example.

Regards & Thanks.
 
Ah, looks like it needed a little fix for jdate to pick up the "Store as local" setting. Try this:

https://github.com/Fabrik/fabrik/commit/ffeed52524ec495f8db78c813a42de31e5f30dc9

... although I would have expected it to default to UTC. I'm assuming when you say "with Default Time set as UTC" you mean you have the "Store as Local" switch set to No?

For the "Custom Query", I don't recall adding that to the fullcalendar plugin ... I added that to the fusioncharts plugin recently, though. Maybe I wrote the wrong plugin name in the comment? Can you point me at the commit on github?

-- hugh
 
Oh, and to answer the implied question about the fullcalendar time zones ... what we do is we check the start and end date element settings, to see if they have a 'date_store_as_local' (and now, or a 'jdate_store_as_local') parameter set. If not, we apply the servers configured Joomla tz to them. If 'store_as_local' is set, we leave the date without applying a TZ.

Which is why I'm slightly confused, because prior to the fix I just applied, "store as local" should have showed up as false, so we should have applied the server's J! TZ.

-- hugh
 
Ah, looks like it needed a little fix for jdate to pick up the "Store as local" setting. Try this:

I just updated. It is working now. Thank you.

... although I would have expected it to default to UTC. I'm assuming when you say "with Default Time set as UTC" you mean you have the "Store as Local" switch set to No?

Yes.

For the "Custom Query", I don't recall adding that to the fullcalendar plugin ... I added that to the fusioncharts plugin recently, though. Maybe I wrote the wrong plugin name in the comment? Can you point me at the commit on github?

https://github.com/Fabrik/fabrik/commit/483b8e0b6e21e79ce48aab872fcd036eb9fc6797

Screenshot 2019-09-18 at 11.28.46 PM.png

Not sure, but where Clause looks in fullcalender Visualisation to me new.

I was referring to custom query and itemid handling. Just wanted to know how to use both as these options are new additions.
 
Oh, right ... my terminology on the commit was wrong then, it's not really a "custom query", just a "where clause". So you can add your own where clause to the query that loads the calendar rows ... like "location_id = 2" or "id in (SELECT some complex subquery here)", etc.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top