Coder Social home page Coder Social logo

Comments (11)

vinceprofeta avatar vinceprofeta commented on September 13, 2024

I am also experiencing this. +1

@okcompute were you able to find a solution?

from react-big-calendar.

vinceprofeta avatar vinceprofeta commented on September 13, 2024

@intljusticemission Any update on this?

from react-big-calendar.

jquense avatar jquense commented on September 13, 2024

there is not, hopefully get some time soon to look into it, but if you want to PR something i'd gladly take it. :)

from react-big-calendar.

MattWilliamsDev avatar MattWilliamsDev commented on September 13, 2024

+1 on this one also. Have been bending over backwards trying to figure this out, but nothing so far.

from react-big-calendar.

MattWilliamsDev avatar MattWilliamsDev commented on September 13, 2024

This could be relevant:
http://stackoverflow.com/questions/21318357/moment-js-issue-adding-days-with-daylight-savings-time

This does boil down to a V8 bug though, so it could still be related to this.

from react-big-calendar.

jquense avatar jquense commented on September 13, 2024

Is this only relevant with the Moment localizer? It doesn't seem to affect globalize (which is what we use) buy I may also just be missing the bug...

from react-big-calendar.

MattWilliamsDev avatar MattWilliamsDev commented on September 13, 2024

I'm unsure, as I have only used the moment localizer. I can assure you though, that for events of the week that DST begins (or ends, I assume), all of the events after Sunday (which is non-DST at midnight) are pushed forward one day, so the event you get in the function passed to props.onSelectEvent actually has a date from the next day.

from react-big-calendar.

shaynethiessen avatar shaynethiessen commented on September 13, 2024

Yeah, I'm having this same issue and am also using Moment.js. Has anyone found a solution?

from react-big-calendar.

MattWilliamsDev avatar MattWilliamsDev commented on September 13, 2024

Sadly, no - unless you want to try your hand at manually checking if the start of the week is/isn't DST and the end of the week is different.

If that is the case, then you know that the events after the start of DST at 2 or 3 am on the day that DST changes will be off by one day until the next week. At that point, you could then possibly switch the dates to use 12:00:00 (noon) instead of 00:00:00 (midnight), which should alleviate the issue of the dates being recognized as the day before.

That said, timezones and DST implementations are a pretty unpredictable game to play, as it gets down deep into all sorts of issues related to who implements DST and who doesn't, and if they do, when do they implement it. It is quite a mess.

I have tried to think of quicker solutions to it, but it isn't imperative to our use case, so we instead opted to make the event seem unclickable. The date itself is clickable, and in our case, triggers the showing of a list of all of the events for the selected day beneath the calendar itself. That might not really help you, but hey, maybe it does.

from react-big-calendar.

jquense avatar jquense commented on September 13, 2024

[...] timezones and DST implementations are a pretty unpredictable game to play, as it gets down deep into all sorts of issues related to who implements DST and who doesn't, and if they do, when do they implement it. It is quite a mess.

This is exactly why we delegate to Moment or Globalize, because they have a better chance of getting it right then us :P. I do want to make sure tho that this is a bug in moment and not the Calendar, I'm sorry I haven't gotten a chance yet to dig in (rl is very hectic now).

from react-big-calendar.

MattWilliamsDev avatar MattWilliamsDev commented on September 13, 2024

Completely understood, and if I had the time (and the team had the available resources), I would attempt to narrow the issue down to the moment localizer myself. For now, we just went with a workaround, but I find it likely that it is an issue with (at least) moment itself, and possibly even related to the known V8 bug that I referenced towards the top of the thread.

I feel like I had a reason that I didn't think calculating everything from noon instead of midnight (as described in my last comment) was the right solution/workaround, but now I can't remember what it was. Do you foresee an issue with doing that when the eventSegments are calculated?

from react-big-calendar.

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.