Defaults views

Defaults views

By default, the scheduler has 3 views:

  • Day view
  • Week view
  • Month view

Initialization

You needn't to write any code to initialize the stated views.

To refer to one of the views, you should use scheduler.Views[i], where

  • i=0 ⇒ month view
  • i=1 ⇒ week view
  • i=2 ⇒ day view
public ActionResult Index() {
    var sched = new DHXScheduler(this);
    ...
    sched.Views[0].Label = "Month calendar";// sets the label for the tab of the month view
 
    return View(sched);
}

Properties

  • Label - (string) the text label.
  • Name - (string) the name of a view. The property is read-only.
  • TabClass - (string) the name of a css class that will be applied to the tab.
  • TabPosition - (integer) the right offset of the view tab in the tabbar. By default, tabs go right-to-left in the order of addition to the scheduler.
  • TabStyle - (string) the style that will be applied to the tab.
  • TabWidth - (integer) the width of the tab
  • ViewType - (string) the type of the view. The property is read-only.

Limiting the number of events per day cell

Generally, the scheduler adjusts the height of a cell to display all the assigned events in it. In case of a big number of events, it can result in long, overcrowded-with-text presentation.
Starting from version 3.0, there is a possibility to control the number of visible in a cell events, i.e. the height of cells.

To set the maximum number of visible in a cell events, use the DHXScheduler.Config.max_month_events property:

var sched = new DHXScheduler();
...
sched.Config.max_month_events = 3;

If the number of assigned events exceeds the value of DHXScheduler.Config.max_month_events, the scheduler will display the 'View more' link. The link will follow the user to the Day view where he or she can see a full list of assigned events.

Max Month Events Property

The 'View more' link can be customized with the DHXScheduler.Templates.month_events_link template:

var sched = new DHXScheduler();
...
sched.Templates.month_events_link = "<a>View more({count} events)</a>";

Resizable events in the Month view

By default, the Month view does not allow changing event duration via d'n'd. User has to use the lightbox to do so. In order to add resize handles to events and make them resizable, use DHXScheduler.Config.resize_month_events config:

var scheduler = new DHXScheduler();
scheduler.Config.resize_month_events = true;

Note, this config will change behavior of multi-day events only. To make both multi-day and single-day event resizable, be sure to enable DHXScheduler.Config.resize_month_timed config:

var scheduler = new DHXScheduler();
scheduler.Config.resize_month_events = true;
scheduler.Config.resize_month_timed = true;

s

Look-and-feel

  • Day view

    Day View
  • Week view

    Week View
  • Month view

    Month View

comments powered by Disqus