HideFreeCells property allows you to hide hours of day (Y axis) that don't contain any events. The business hours will be always visible.

It isn't applicable to HeightSpec = "BusinessHoursNoScroll" height mode.

The default value is false.

ASP.NET WebForms

<DayPilot:DayPilotCalendar runat="server" ID="DayPilotCalendar1"
  HideFreeCells="true"
  ...
/>

ASP.NET MVC

MVC View

@Html.DayPilotCalendar("dpc", new DayPilotCalendarConfig { 

  // ...
  HideFreeCells = true,
  // ...
	
})

JavaScript

<div id="dp"></div>

<script type="text/javascript">
  var dp = new DayPilot.Calendar("dp");
  dp.hideFreeCells = true;
  // ...
  dp.init();
</script>