DayPilot.Calendar.onTimeRangeClicked

The onTimeRangeClicked event handler fires when the user clicks an existing time range in the JavaScript Calendar component, after the default action has been performed.

Declaration

DayPilot.Calendar.onTimeRangeClicked(args)

Parameters

Examples

JavaScript

const calendar = new DayPilot.Calendar("dp", {
  onTimeRangeClicked: args => {
    DayPilot.Modal.alert(args.start.toString() + " - " + args.end.toString());
  },
  // ...
});
calendar.init();

Angular

<daypilot-calendar [config]="config"></daypilot-calendar>
config: DayPilot.CalendarConfig = {
  onTimeRangeClicked: args => {
    DayPilot.Modal.alert(args.start.toString() + " - " + args.end.toString());
  },
  // ...
};

React

<DayPilotCalendar
  onTimeRangeClicked={onTimeRangeClicked}
  {/* ... */}
/>
const onTimeRangeClicked = (args) => {
  DayPilot.Modal.alert(args.start.toString() + " - " + args.end.toString());
};

Vue

<DayPilotCalendar
  @timeRangeClicked="onTimeRangeClicked"
  <!-- ... -->
/>
const onTimeRangeClicked = (args) => {
  DayPilot.Modal.alert(args.start.toString() + " - " + args.end.toString());
};

See Also

DayPilot.Calendar.onTimeRangeClick

Resources View [doc.daypilot.org]

DayPilot.Calendar Class

Availability

Availability of this API item in DayPilot editions:

LitePro
DayPilot for JavaScript