An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

          

[![Published on NPM](https://img.shields.io/npm/v/@fooloomanzoo/datetime-input.svg)](https://www.npmjs.com/package/@fooloomanzoo/datetime-input)
[![Published on webcomponents.org](https://img.shields.io/badge/webcomponents.org-published-blue.svg)](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)