@fooloomanzoo/datetime-input

an input for date and time

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
@fooloomanzoo/datetime-input
753.0.44 years ago5 years agoMinified + gzip package size for @fooloomanzoo/datetime-input in KB

Readme

Published on NPM Published on webcomponents.org API & Demo

\

An input for date and time. If you are looking for a picker for date and time, please have a look at datetime-picker
.

Example

```html with timezone



timezone">

timezone" with-timezone="{{withTimezone}}">

<code>datetime:</code> <b>[[datetime]]</b><br>
<code>date:</code> <b>[[date]]</b><br>
<code>time:</code> <b>[[time]]</b><br>
<code>value:</code> <b>[[value]]</b>

```

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:

<option value=""></option>
<option value="en">english</option>
<option value="fr">français</option>
<option value="de">deutsch</option>
<option value="es">español</option>
<option value="it">italiano</option>
<option value="ru">русский</option>
<option value="ja">日本語</option>
<option value="zh">中文</option>


hour12 format

hour12">

datetime: datetime

```

Styling

Have a look at input-picker-pattern#input-shared-style to see how to style the element.

Installation

``` npm i @fooloomanzoo/datetime-input ```

License

MIT