README
Datetimepicker
DateTime picker.
Installation
Browser
<script src="/path/to/datetimepicker.min.js"></script>
//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
});