Skip to main content

onClick

Description

Fires when the user clicks the left mouse button on an event

onClick: (id: string, e: Event) => boolean;

Parameters

  • id - (required) string - the event's id
  • e - (required) Event - a native event object

Returns

  • result - (boolean) - defines whether the default action of the event will be triggered (true) or canceled (false)

Example

scheduler.attachEvent("onClick", function (id, e){
//any custom logic here
return true;
});

Details

The event is blockable. If non-true value is returned from the handler, the default reaction will be blocked ( by default, the selection bar appears).

Need help?
Got a question about the documentation? Reach out to our technical support team for help and guidance. For custom component solutions, visit the Services page.