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

[alpha2] Events not in order by start time in print version #4432

Closed
bbalet opened this issue Dec 31, 2018 · 8 comments

Comments

Projects
None yet
3 participants
@bbalet
Copy link

commented Dec 31, 2018

If you compare the behavior of the print feature (CTRL+P):

You will notice that since alpha2, the order of events is not correct into the printed preview/page. Indeed, the first event being printed is:

1:00 PM - 2:50 PM
Microsoft Office ,
B12-Lab, Rady

Although the first event of the day is:

7:30 AM - 9:20 AM
Typing, B12-Lab,
SopheakROS

I suspect that we loose something by removing Momentjs and that the dates are now sorted out by alpha instead of date or their timestamp.

@acerix

This comment has been minimized.

Copy link
Member

commented Dec 31, 2018

It seems the problem is that you event times include a timezone, it works if I remove that:

https://codepen.io/anon/pen/Kbyxgv?editors=0010

The event times should be in the same timezone as the calendar and not include the timezone in the start/end.

@bbalet

This comment has been minimized.

Copy link
Author

commented Jan 2, 2019

I've tried your CodePen with Google chrome, but it doesn'twork:

fullcalendar_wrong_order

@acerix

This comment has been minimized.

Copy link
Member

commented Jan 2, 2019

Thanks for the clarification, I was having trouble seeing the print preview but see the issue now and made a simplified test case:

https://codepen.io/anon/pen/aPEjdB?editors=0010

It seems the events are now printed in the order they are defined instead of when they start.

@acerix acerix added Confirmed and removed Reproducing labels Jan 2, 2019

@acerix acerix changed the title [alpha3] Print / Event order Regression between alpha1 and alpha3 [v4] Print / Event order Regression between alpha1 and alpha3 Jan 2, 2019

@acerix acerix changed the title [v4] Print / Event order Regression between alpha1 and alpha3 [v4] Events not in order by start time in print version starting in alpha3 Jan 2, 2019

@bbalet bbalet changed the title [v4] Events not in order by start time in print version starting in alpha3 [v4] Events not in order by start time in print version starting in alpha2 Jan 3, 2019

@bbalet

This comment has been minimized.

Copy link
Author

commented Jan 4, 2019

In order to avoid any confusion, I'd like to clarify that adding timezone to dates has nothing to do with this issue. I've forked your last pen and:

  • Add timezone to events.
  • Sort the events by dates.

And it is working fine: https://codepen.io/bbalet/pen/yGvqde?editors=0010

So the workaround while waiting for the patch is to sort the events with a simple code such as:

data.sort(function(a, b) {
  return  new Date(a.start) - new Date(b.start);
});
@acerix

This comment has been minimized.

Copy link
Member

commented Jan 4, 2019

Thanks for the workaround.

Regarding the timezone, the issue that I get is that the events are not in the correct place in your alpha3 example so the calendar looks mostly empty. I'm guessing you are in the same timezone (+7) which is why you don't see that issue.

@acerix acerix changed the title [v4] Events not in order by start time in print version starting in alpha2 [alpha2] Events not in order by start time in print version Jan 4, 2019

@acerix acerix added this to the v4 milestone Jan 4, 2019

@bbalet

This comment has been minimized.

Copy link
Author

commented Feb 12, 2019

Bug still present in beta
Workaround still working in beta

@arshaw

This comment has been minimized.

Copy link
Member

commented Mar 8, 2019

fixed in master

@arshaw

This comment has been minimized.

Copy link
Member

commented Mar 20, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.