https://github.com/fooloomanzoo/datetime-input
an input for date and time
https://github.com/fooloomanzoo/datetime-input
Last synced: about 1 year ago
JSON representation
an input for date and time
- Host: GitHub
- URL: https://github.com/fooloomanzoo/datetime-input
- Owner: fooloomanzoo
- License: mit
- Created: 2018-01-19T07:03:12.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2020-09-06T21:12:59.000Z (almost 6 years ago)
- Last Synced: 2025-03-16T13:18:27.379Z (over 1 year ago)
- Language: HTML
- Size: 766 KB
- Stars: 8
- Watchers: 1
- Forks: 1
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
[](https://www.npmjs.com/package/@fooloomanzoo/datetime-input)
[](https://www.webcomponents.org/element/@fooloomanzoo/datetime-input)
_[API & Demo](https://fooloomanzoo.github.io/datetime-input)_
## \
An input for date and time.
If you are looking for a picker for date and time, please have a look at [datetime-picker](https://github.com/fooloomanzoo/datetime-picker).
### Example
```html
with timezone
datetime: [[datetime]]
date: [[date]]
time: [[time]]
value: [[value]]
```
#### Use locale date formats
The properties `date`, `time`, `datetime` are always in **iso8061** but the visualization will be localized. By default your locale date format from `window.navigator.language` will be used, but you can select another *locale*:
```html
locale:
english
français
deutsch
español
italiano
русский
日本語
中文
hour12 format
datetime: [[datetime]]
```
### Styling
Have a look at [input-picker-pattern#input-shared-style](https://github.com/fooloomanzoo/input-picker-pattern#input-shared-style) to see how to style the element.
### Installation
```
npm i @fooloomanzoo/datetime-input
```
### License
[MIT](https://github.com/fooloomanzoo/datetime-input/blob/master/LICENSE.txt)