https://github.com/circunspecter/datetimepicker
DateTime picker.
https://github.com/circunspecter/datetimepicker
date-picker datepicker datetime-picker datetimepicker
Last synced: 8 months ago
JSON representation
DateTime picker.
- Host: GitHub
- URL: https://github.com/circunspecter/datetimepicker
- Owner: circunspecter
- License: mit
- Created: 2018-02-09T17:28:22.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-02-09T17:46:44.000Z (over 8 years ago)
- Last Synced: 2025-06-02T20:46:54.968Z (about 1 year ago)
- Topics: date-picker, datepicker, datetime-picker, datetimepicker
- Language: JavaScript
- Homepage: https://circunspecter.github.io/datetimepicker/
- Size: 85.9 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://travis-ci.org/circunspecter/datetimepicker)
[](https://coveralls.io/github/circunspecter/datetimepicker?branch=master)
# Datetimepicker
DateTime picker.
[Documentation and examples](https://circunspecter.github.io/datetimepicker/ "Documentation and examples")
### Installation
#### Browser
```html
```
[unpkg CDN](https://unpkg.com "unpkg"):
```html
//unpkg.com/@circunspecter/datetimepicker@latest/dist/datetimepicker.min.js
```
#### npm
```shell
npm install @circunspecter/datetimepicker
```
### Basic usage
```js
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
});
```