Appointment Picker Examples

Calling exposed functions

To open or set and open a time use the buttons

Get the current time

var picker = new AppointmentPicker(document.getElementById('time-3'), {});

console.log(picker.getTime());

Get the current time by event listener

change the time

var picker = new AppointmentPicker(document.getElementById('time-ev'), {});

document.getElementById('time-ev').addEventListener('change.appo.picker', function (e) { // code }, false);

Destroy the picker

var $picker = $('#time-1').appointmentPicker();

$('#remove-1').on('click', function() {
	$picker.appointmentPicker.destroy();
});

Copyright Jan Suwart, MIT license