@circunspecter/datetimepicker

DateTime picker.

Usage no npm install needed!

<script type="module">
  import circunspecterDatetimepicker from 'https://cdn.skypack.dev/@circunspecter/datetimepicker';
</script>

README

Build Status Coverage Status

Datetimepicker

DateTime picker.

Documentation and examples

Installation

Browser

<script src="/path/to/datetimepicker.min.js"></script>

unpkg CDN:

//unpkg.com/@circunspecter/datetimepicker@latest/dist/datetimepicker.min.js

npm

npm install @circunspecter/datetimepicker

Basic usage

let datetimepicker = new Datetimepicker();

datetimepicker.addListener('dtp:day:click', (e) => {
  let dateTime = e.detail.dateTime.toLocaleDateString(undefined, {
    year: 'numeric', month: 'long', day: 'numeric',
    hour: '2-digit', minute: '2-digit',
    hour12: true
  });
  // dateTime: August 13, 2030, 12:00 AM
});