search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

TimeRange moving down and down

Asked by Cezar
3 years ago.


I've just seen a bug with TimeRanges, it is moving constantly down and down and in fact it shows wrong hours.
As an example I uploaded a photo of TimeRanges at the beggining of the day and next to it there is a foto with TimeRange moved slightly down. On selecting 1:00 it will show range 1:00-1:15, but on the second screen I wanted to select 16:00-16:15, but it shows 15:45-16:00. It is strange and I don't know what is wrong here.

My code:
<div id="daily" style="float:left; width:44%; margin-left:20px; display:block">
@Html.DayPilotCalendar("dp_day", new DayPilotCalendarConfig
BackendUrl = Url.Action("EvActive", "Calendar"),
ViewType = DayPilot.Web.Mvc.Enums.Calendar.ViewType.Day,
TimeRangeSelectedHandling = DayPilot.Web.Mvc.Events.Calendar.TimeRangeSelectedHandlingType.JavaScript,
TimeRangeSelectedJavaScript = "create(start, end)",
ColumnMarginRight = 100,
TimeFormat = DayPilot.Web.Mvc.Enums.TimeFormat.Clock24Hours,
CellDuration = 15,

Comment posted by Dan Letecky [DayPilot]
3 years ago.

It looks like it might be a CSS-related issue. Your global CSS styles might affect the cell height which is 1-2 pixels more than expected. Can you try to turn off the global CSS temporarily to see if it is causing the problem?

Comment posted by Cezar
3 years ago.

I turned off loading bootstrap and it still looks the same.

Comment posted by Dan Letecky [DayPilot]
3 years ago.

1. Is your browser zoom set to 100%?

2. If it is, I suggest inspecting the cell element using browser developer tools - check what styles are applied to the cell. The height is defined using inline "height" style on the element with calendar_default_event class - it should be set to 20px (the default value).

The actual height in your screenshot is 23px.

If there is any global style that defines margin or padding this will get added to the specified height.

It looks like something similar happens to the hour headers - the final height should be 80 pixels (20px * 4) but it is 90 pixels.

Answer posted by Cezar
3 years ago.

Ah you're right, have no idea who changed it, but on 100% it is fine, sorry for problem.

This question is more than 3 months old and has been closed. Please create a new question if you have anything to add.