JavaScript

The JavaScript version uses api2 by default.

Possible handling types (headerClickHandling):

  • 'Enabled' (default)
  • 'Disabled'
dp.onHeaderClicked = function(args) {
  alert("Day clicked: " + args.header.dayOfWeek);
};

ASP.NET WebForms

You can assign an action to event click using HeaderClickHandling property.

  • 'Disabled' (default)
  • 'PostBack'
  • 'CallBack'
  • 'JavaScript'
<DayPilot:DayPilotMonth 
  ID="DayPilotMonth1" 
  runat="server" 
  HeaderClickHandling="JavaScript"
  HeaderClickJavaScript="alert('Day clicked: ' + day);"
  ...
  />

ASP.NET MVC

You can assign an action to event click using HeaderClickHandling property.

  • 'Disabled' (default)
  • 'CallBack'
  • 'JavaScript'
@Html.DayPilotMonth("dpm", new DayPilotMonthConfig {
  BackendUrl = ResolveUrl("~/Month/Backend"),
  HeaderClickHandling = HeaderClickHandlingType.JavaScript,
  HeaderClickJavaScript = "alert('Day clicked: ' + day);",
  ...
})