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

Week starting from saturday when moment timezone and browser timezones are different #967

Closed
KartikShankhavaram opened this issue Aug 24, 2018 · 3 comments

Comments

@KartikShankhavaram
Copy link
Contributor

KartikShankhavaram commented Aug 24, 2018

Do you want to request a feature or report a bug?

Report a bug

What's the current behavior?

I am using moment as a localizer. I have the set the timezone as America/New York. When I open the calendar with the browser in that time zone(ET), it works fine. However, when I open it from my timezone(IST), it starts the day from Saturday. I have made some customisation to the calendar, one of which uses the dayOfWeek value to do something. And because of this localizer thing, it's breaking.
rbc-bug

It even adds this extra empty line on the calendar, because of the localizer problem.
rbc-bug-2

What's the expected behavior?

It should start from Sunday, no matter what the timezone is.

The week starts from Sunday if I change my browser timezone to ET. This works fine.
rbc-expected

Can anyone help me with this problem? I've sat at it for hours and even checked the issues section but I couldn't find a solution. Thank you so much!

PS: Btw, since I'm showing the events using my own layout using a custom DateCellWrapper and I only need to show the calendar for a single locale(en-US), is there any way I can skip adding the localizer to BigCalendar?

@KartikShankhavaram KartikShankhavaram changed the title Week starting from saturday when using moment timezone and browser timezones are different Week starting from saturday when moment timezone and browser timezones are different Aug 24, 2018
@arecvlohe
Copy link
Collaborator

Also check #118

@Apol0x
Copy link

Apol0x commented Nov 14, 2018

Hi, I found this possible result for your question. It was useful to me, I don't know if it will help you
Stackoverflow-- question 45671732

@jquense jquense closed this as completed Nov 19, 2018
@KartikShankhavaram
Copy link
Contributor Author

Is there a way I can avoid using a localizer?

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

4 participants