Giter Club home page Giter Club logo

Comments (5)

acerix avatar acerix commented on July 17, 2024

Thanks, confirmed.

from fullcalendar-vue.

arshaw avatar arshaw commented on July 17, 2024

That's what's supposed to happen if you don't provide a named-timezone plugin
https://fullcalendar.io/docs/timeZone#with-a-timezone-plugin

If would like to see how your non-Vue example works, but the link is broken. Could you post one that works?

from fullcalendar-vue.

Krantisinh avatar Krantisinh commented on July 17, 2024

@arshaw https://fullcalendar.io/docs/timeZone-demo
This one in the official docs works with plain JS implementation. This implementation does not seem to use any timezone plugin, however, it uses an event feed.

I did in fact go through the docs before posting this question and did not quite get the meaning of UTC coercion. The docs do mention that if no timezone plugin is used, we need to use full calendar in tandem with an event json feed. This is evident to me now as I tried using plain events array in the above example with vanilla js implementation and it defaults to UTC time for each timezone except local as illustrated in this https://codepen.io/anon/pen/VJzRpG?editors=0010.

So, I guess, what you are suggesting is right. We need to use a timezone plugin for timezone support unless one is using an event feed.

But I'm still not sure how using an event feed works without a timezone plugin. The feed supplies the calendar with an array of events. And if we supply that array manually without a feed [as in this codepen], time zones do not work!

from fullcalendar-vue.

douggrubba avatar douggrubba commented on July 17, 2024

Did this ever get addressed? If not does anybody have a cleanish work around. I'm definitely butting up against this. The calendar w/ business hours seems to be respecting the timezone, but the dateclick does not seem to be at all as described above.

As a work around I have tried: this.calendarApi.setOption("timezone", timezoneStr);

But it is the same as providing it as a prop.

from fullcalendar-vue.

arshaw avatar arshaw commented on July 17, 2024

@Krantisinh, the reason you are seeing the event-rendering difference between vanilla JS and Vue has nothing to do with Vue. The reason is that the demo hosted on fullcalendar.io is requesting a URL like this:

https://fullcalendar.io/demo-events.json?start=2020-06-28T00%3A00%3A00Z&end=2020-08-09T00%3A00%3A00Z&timeZone=UTC

It sends the timeZone as a GET parameter. The script (which is a PHP script behind the scenes) looks at this param and sends back events with datetime values in the given timeZone.

from fullcalendar-vue.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.