Skip to content
forked from pirxpilot/clock

Clock UI component for use in time-picker

License

Notifications You must be signed in to change notification settings

sachalifs/clock

 
 

Repository files navigation

clock

Clock UI component for use in time-picker

Clock

Installation

$ component install code42day/clock

Example

var Clock = require('clock');
var clock = new Clock;
clock.el.appendTo('body');
clock.select({
	hour: 11,
	minute: 30
});

Events

  • change (time, complete) - when the selected time is modified time is an object with hour and minute properties, complete is true only if both hours and minutes have been clicked by the user

API

Clock#select(time)

Select the given time ({ hour, minute }).

Clock#min(minTime)

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.

Clock#max(maxTime)

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.

License

MIT

About

Clock UI component for use in time-picker

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 97.5%
  • CSS 2.5%