Skip to main content

Event Handling

Attaching event listeners#

You can attach event listeners with the timepicker.events.on() method:

timepicker.events.on("Change", function(value){    console.log("The value of a timepicker has changed to "+ value);});

Related sample: Timepicker. Timepicker Events

note

The names of events are case-insensitive.

Detaching event listeners#

To detach events, use timepicker.events.detach():

timepicker.events.on("Change", function(value){    console.log("The value of a timepicker has changed to "+ value);});timepicker.events.detach("Change");

Calling events#

To call events, use timepicker.events.fire():

timepicker.events.fire("name",args);// where args is an array of arguments

The list of events is available in the API section.