Comments (11)
I am also experiencing this. +1
@okcompute were you able to find a solution?
from react-big-calendar.
@intljusticemission Any update on this?
from react-big-calendar.
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.
+1 on this one also. Have been bending over backwards trying to figure this out, but nothing so far.
from react-big-calendar.
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.
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.
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.
Yeah, I'm having this same issue and am also using Moment.js. Has anyone found a solution?
from react-big-calendar.
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.
[...] 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.
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)
- Pass 'accessors' prop to the 'DayColumnWrapper' component HOT 2
- Expired slack invitation link HOT 2
- Vertical scrolling of multiple days (vertical, hourly week view)? HOT 1
- When pass resizableAccessor=true, and draggableAccessor=false, than resizable is not working HOT 2
- Time Slot Issue In Week View HOT 4
- Time Slot Issue In Week View HOT 11
- Error "Super expression must either be null or a function" HOT 4
- Week view, Event showing twice HOT 8
- Clicking backgroundEvent triggers onSelectSlot HOT 6
- Events are hiding if the contents are more HOT 2
- Setting event width to half day horizontally in week view instead of full
- How does event truncation work in month view? HOT 1
- Add label to all thursdays beside events in react big calendar
- New Slack Link Required
- Click the event trigger rerender timesSlotWrapper HOT 1
- Duplicate event shows up on month view when try to re-size
- Trouble in Next js HOT 6
- date overlay the modal HOT 2
- Make ResourceID available in dayPropGetter HOT 1
- Id type are missing HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-big-calendar.