popup-picker

Building block for a floating interactive popup

Usage no npm install needed!

<script type="module">
  import popupPicker from 'https://cdn.skypack.dev/popup-picker';
</script>

README

picker

Building block for a floating interactive popup

Picker

Installation

$ npm install popup-picker

Example

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