https://github.com/pirxpilot/popup-clock
a timepicker component
https://github.com/pirxpilot/popup-clock
Last synced: over 1 year ago
JSON representation
a timepicker component
- Host: GitHub
- URL: https://github.com/pirxpilot/popup-clock
- Owner: pirxpilot
- License: mit
- Created: 2013-02-18T04:01:43.000Z (over 13 years ago)
- Default Branch: main
- Last Pushed: 2024-01-30T16:12:28.000Z (over 2 years ago)
- Last Synced: 2025-04-09T21:53:07.952Z (over 1 year ago)
- Language: HTML
- Size: 164 KB
- Stars: 4
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- Changelog: History.md
- License: License.txt
Awesome Lists containing this project
README
[![NPM version][npm-image]][npm-url]
[![Build Status][build-image]][build-url]
[![Dependency Status][deps-image]][deps-url]
# popup-clock
Time picker ui component for [popup-clock]
Click [here](http://pirxpilot.github.io/popup-clock/) to see online demo.
## Installation
$ npm install popup-clock
## Example
```js
var Timepicker = require('popup-clock');
var el = document.querySelector('[name=time]');
new Timepicker(el, options)
.clock
.on('change', function(v) {
el.value = (v.hour || '0') + ':' + (v.minute || '00');
});
```
## API
### new Timepicker(el)
Create a new Timepicker attached to `el` input DOM node
### Timepicker.clock
[clock][popup-clock] reference
## License
MIT
[popup-clock]: https://npmjs.org/package/popup-clock
[npm-image]: https://img.shields.io/npm/v/popup-clock
[npm-url]: https://npmjs.org/package/popup-clock
[build-url]: https://github.com/pirxpilot/popup-clock/actions/workflows/check.yaml
[build-image]: https://img.shields.io/github/actions/workflow/status/pirxpilot/popup-clock/check.yaml?branch=main
[deps-image]: https://img.shields.io/librariesio/release/npm/popup-clock
[deps-url]: https://libraries.io/npm/popup-clock