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

BusinessBeginsHour BusinessEndsHour not set when switching between day, week, and month view

Asked by willy
9 years ago.

I'm following this tutorial: http://code.daypilot.org/33944/event-calendar-day-week-month-for-asp-net-mvc
to create calendar in day, week or month view.

I've set BusinessBeginsHour and BusinessEndsHour in both of day view and week view, as below:

@Html.DayPilotCalendar("dp_day", new DayPilotCalendarConfig
{
BackendUrl = Url.Action("Day", "Calendar"),
BusinessBeginsHour = 8,
BusinessEndsHour = 17,
...

@Html.DayPilotCalendar("dp_week", new DayPilotCalendarConfig
{
BackendUrl = Url.Action("Week", "Calendar"),
BusinessBeginsHour = 8,
BusinessEndsHour = 17,
...

The default view is week view

switcher.show(dp_day);

If I run the application, the calendar will show the time between 8 (8 am) until 17 (5 pm) in week view. But if I changed the view type into day view, and the calendar will show the time start from 12 am until 8 am.

How to fix this?

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