https://github.com/pirxpilot/popup-picker
Building block for a floating interactive popup
https://github.com/pirxpilot/popup-picker
Last synced: 5 months ago
JSON representation
Building block for a floating interactive popup
- Host: GitHub
- URL: https://github.com/pirxpilot/popup-picker
- Owner: pirxpilot
- License: mit
- Created: 2015-09-16T15:26:10.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2018-11-29T23:59:58.000Z (over 7 years ago)
- Last Synced: 2025-03-03T19:40:25.415Z (over 1 year ago)
- Language: JavaScript
- Size: 11.7 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- Changelog: History.md
- License: License.txt
Awesome Lists containing this project
README
# picker
Building block for a floating interactive popup

## Installation
$ npm install popup-picker
## Example
```js
var Picker = require('picker');
new Picker(el, new Clock())
.on('change', function(v) {
var value = (v.hour || '0') + ':' + (v.minute || '00');
});
```
## Events
- `change` (time) - when content item g selected time is modified
- `show` [popover] show event
- `hide` [popover] hide event
## API
### new Picker(el, item)
Create a new Picker attached to `el` input DOM node
`item` - interactive element such as [clock] or [calendar]
### item
Direct access to `item` passed in constructor
## License
MIT
[popover]: https://github.com/pirxpilot/popover
[clock]: https://github.com/pirxpilot/clock
[calendar]: https://github.com/pirxpilot/calendar