Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

code42day-clock

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

code42day-clock

Clock UI component for use in time-picker

  • 1.5.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

NPM version Build Status Dependency Status

clock

Clock UI component for use in time-picker

Clock

Click here to see online demo.

Installation

$ npm install --save 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({ captions })

  • captions - optional dictionary { hours, minutes, am, pm } - entries will be used by clock to render captions for Hours, Minutes, AM and PM - Object or HTMLElement.dataset can be used as a dictionary

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.

Clock#type(type)

Set type to 12 to display 12 hour am/pm type of clock. Any other value resets the clock display to standard 24 hour display.

License

MIT

Keywords

FAQs

Package last updated on 05 Feb 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc