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

Daypilot Event Calender HeightSpec property Issue

Asked by Steve
7 years ago.

Hello,

I have purchased Daypilot about a month ago.

Below is my code in my view using asp.net MVC C#:

@Html.DayPilotCalendar("dpc", new DayPilotCalendarConfig
{
ViewType = DayPilot.Web.Mvc.Enums.Calendar.ViewType.Week,
BackendUrl = Url.Action("mysecretURL"),
TimeRangeSelectedHandling = DayPilot.Web.Mvc.Events.Calendar.TimeRangeSelectedHandlingType.CallBack,
ShowAllDayEvents = false,
BusinessBeginsHour = 9,
BusinessEndsHour = 23,
HeightSpec = HeightSpec.BusinessHours,
EventBubble = "bubble",
EventClickHandling = EventClickHandlingType.Edit,
EventEditHandling = EventEditHandlingType.CallBack,
EventDeleteHandling = EventDeleteHandlingType.CallBack,
ContextMenu = "menu",
HeaderHeight = 40,
AfterRenderJavaScript = "afterRender(data, isCallBack)",
})

My issue is that i when the calender loads i want it to start on the BusinessHour I defined (9AM) it does not work but when i use:

HeightSpec = HeightSpec.BusinessHoursNoScroll

It works but now i cannot scroll to earlier times.

I was using this to help me:
http://doc.daypilot.org/calendar/height/

Please help as this is a time sensitive issue.

Thank you in advanced.

Answer posted by Dan Letecky [DayPilot]
7 years ago.

If the calendar is inside a hidden element during startup the scrollbar position can't be set (this is a browser limitation).

There is a workaround solution implemented in the latest sandbox build (7.9.5729) - it checks the calendar periodically until it becomes visible and then sets the scrollbar position.

http://mvc.daypilot.org/sandbox/

An official SP release will be available next week.

Let me know if it didn't help.

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