DayPilot.Month.onHeaderClicked

The onHeaderClicked event handler fires when the user clicks a day header in the monthly calendar, after the click has been processed.

Declaration

DayPilot.Month.onHeaderClicked(args)

Parameters

  • args.header.dayOfWeek (number) - day-of-week index of the clicked header

Notes

Use onHeaderClick when you need to intercept the click before the default action runs.

Examples

JavaScript

const month = new DayPilot.Month("dp", {
  onHeaderClicked: (args) => {
    console.log("Header clicked: " + args.header.dayOfWeek);
  },
  // ...
});
month.init();

Angular

<daypilot-month [config]="config"></daypilot-month>
config: DayPilot.MonthConfig = {
  onHeaderClicked: (args) => {
    console.log("Header clicked: " + args.header.dayOfWeek);
  },
  // ...
};

React

<DayPilotMonth
  onHeaderClicked={onHeaderClicked}
  {/* ... */}
/>
const onHeaderClicked = (args) => {
  console.log("Header clicked: " + args.header.dayOfWeek);
};

Vue

<DayPilotMonth
  @headerClicked="onHeaderClicked"
  <!-- ... -->
/>
const onHeaderClicked = (args) => {
  console.log("Header clicked: " + args.header.dayOfWeek);
};

See Also

DayPilot.Month Class

Availability

Availability of this API item in DayPilot editions:

LitePro
DayPilot for JavaScript