Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First row behaviour in month view #32

Closed
mchl-hub opened this issue Jan 28, 2016 · 7 comments
Closed

First row behaviour in month view #32

mchl-hub opened this issue Jan 28, 2016 · 7 comments

Comments

@mchl-hub
Copy link

Hello,
thanks a lot for great work with react-big-calendar. I have noticed something weird in Month view at your example page: http://intljusticemission.github.io/react-big-calendar/examples/index.html
When I look at events file i find:

  {
    "title": "All Day Event",
    "allDay": true,
    "start": new Date(2015, 3, 0),
    "end": new Date(2015, 3, 0)
  }

which tells me that this event should be displayed one cell to the right (Tuesday). I see it on Monday.
This happens every time I set start and end date up to new Date(2015, 3, 4), here we got Friday (which is one day late in my opinion). Then when I change dates to new Date(2015, 3, 5) the display skips Saturday and displays on Sunday.

Regards

@jquense
Copy link
Owner

jquense commented Jan 28, 2016

Hey there, Thanks for the issue. I am a bit confused about whats happening on your end...When I look at the basic example I see that event on Tuesday the 31st of Feb, which seems to be different than what you are seeing?

@mchl-hub
Copy link
Author

Yes, I think this may be some localizer problem, this is what I see: http://prntscr.com/9vy0p9

@jquense
Copy link
Owner

jquense commented Jan 28, 2016

dates are terrible...I don't think its a localizer (it may be localization in general tho) issue since all the calculations are happening directly on the js Date objects, with the localizers only being used to essentially to format dates...I could always be wrong tho.

Where are you in the world? if you run the examples locally do you have the same issues? If you don't mind it would be really helpful if you could step through some of the code to identify where the issue is, since its hard for me to repo the bug

@mchl-hub
Copy link
Author

I will try to identify the problem.
I checked culture example and I've noticed that the problem with this event occurs with settings 'en' and 'ar-AE' (it is placed on 30th day of the month). Everything seems to be all right with settings 'en-GB', 'es' and 'fr' (event is placed on 31st day of the month).
This problem is present on your example site as well as on my local dev server.
I am in Poland.

@mchl-hub
Copy link
Author

I did not fix the problem but made it work on my local server by setting 'en-GB' at first and now 'pl-PL' as my globalize-culture. Right now this is enough for me, because calendar is functional, thanks a lot for your time and good luck with react-big-calendar. Great work!

@mchl-hub
Copy link
Author

mchl-hub commented Feb 1, 2016

Hello, I have related question so I put it here.
In your example I always see Long Event takes three days from 7th to 9th (no matter which culture I choose), but in events I can see:

  {
    "title": "Long Event",
    "start": new Date(2015, 3, 7),
    "end": new Date(2015, 3, 10),
  }

Do you have the same or this is it still my browser?

@mchl-hub
Copy link
Author

mchl-hub commented Feb 1, 2016

I just realized that this may be the right event display for "Long Event", but then I can see "Conference" is displayed badly when I choose 'en-GB' it takes 3 days (including 13th). That's why I am not sure which event date range end is correct inclusive or exclusive. Can you confirm?

@jquense jquense closed this as completed in a2a49c8 Apr 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants