React-big-calendar: Event height is incorrect for 15 minute slots

Created on 17 Feb 2018  ·  6Comments  ·  Source: jquense/react-big-calendar

When the start and end times are 15 minutes apart, the height is rendered as if it's a 30 minute slot.

enhancement wontfix

Most helpful comment

https://codesandbox.io/s/wjjq8k6ow

I created an event called "Event shorter than step" for 3/10/2015.

I think I know what the problem is. It seems the minimum height is based on the time-step. By default, the time-step is 30 minutes, so anything shorter will not have its actual height.

I bypassed this in the app I'm working on by setting the steps to 5 minutes and overriding the css to remove the step borders. That should cover most events, but not for events with time durations that are shorter than 5 minutes.

All 6 comments

I think there's a min-height of 20px set on events (using css). You should be able to override this though.

The height of the 15-minute event is actually more than 20px. So, I know
the min-height isn't the problem. But it's good to keep in mind, in case I
make event cell smaller, thanks.

I see that calculation of the height is the same as 30-minute events.

The time range is from 8am - 5pm, total of 540 minutes. Thirty minutes give
5.55%, and that's exactly what I see for the 15-minute event. It should be
2.77%. There has to be something wrong with the event height calculations.

On Sun, Feb 18, 2018 at 7:41 AM, Tobias Andersen notifications@github.com
wrote:

I think there's a min-height of 20px set on events (using css). You
should be able to override this though.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/intljusticemission/react-big-calendar/issues/731#issuecomment-366524780,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AEFjTTyAcOaBs1BhTo6O7VNO8Z49z-nHks5tWESRgaJpZM4SJIBh
.

Can you please provide a repro using the code sandbox in the issue template thanks!

https://codesandbox.io/s/wjjq8k6ow

I created an event called "Event shorter than step" for 3/10/2015.

I think I know what the problem is. It seems the minimum height is based on the time-step. By default, the time-step is 30 minutes, so anything shorter will not have its actual height.

I bypassed this in the app I'm working on by setting the steps to 5 minutes and overriding the css to remove the step borders. That should cover most events, but not for events with time durations that are shorter than 5 minutes.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Any update on this?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dogC76 picture dogC76  ·  4Comments

mathieusanchez picture mathieusanchez  ·  4Comments

zhming0 picture zhming0  ·  3Comments

connercms picture connercms  ·  3Comments

npalansky picture npalansky  ·  3Comments