clock-input
widget to select time
Last updated 7 years ago by shtylman .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install clock-input 
SYNC missed versions from official npm registry.

clock-input

clock-like time input control

clock input

install

npm install clock-input

use

var ClockInput = require('clock-input');

var clock = ClockInput(document.querySelector('#clock'));

// set the hour/minute off the passed in date
clock.set_time(new Date());

clock.on('change', function(date) {
    date.getHours();
    date.getMinutes();
});

Package via browserify or your other favorite bundler.

api

ClockInput(HTMLElement)

return a new clock-input object created inside of the element you provide

ClockInput.set_time(date)

Set the input time to the date's time

events

The following events are emitted as ClockInput is an Emitter

change(date)

Change gets a date parameter with the newly selected time. Is also emitted when you explicitly set the time via set_time.

Current Tags

  • 0.0.1                                ...           latest (7 years ago)

2 Versions

  • 0.0.1                                ...           7 years ago
  • 0.0.0                                ...           7 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 0
Last Month 1
Dependencies (4)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |