Clock UI component for use in time-picker
$ component install code42day/clock
var Clock = require('clock');
var clock = new Clock;
clock.el.appendTo('body');
clock.select({
hour: 11,
minute: 30
});
change
(time, complete) - when the selected time is modifiedtime
is an object withhour
andminute
properties,complete
is true only if both hours and minutes have been clicked by the user
Select the given time
({ hour, minute }).
Define the minimum time selectable with this clock (inclusive). Time values smaller than minTime
are rendered with invalid
class. All change
events are generated only for values larger or equal
to minTime
.
Define the maximum time selectable with this clock (inclusive). Time values larger than maxTime
are rendered with invalid
class. All change
events are generated only for values smaller or equal
to maxTime
.
MIT