greenyouse / datetime-local-input

A polymer datetime-local component

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

<datetime-local-input>

A polymer datetime-local component

Demo

Check it live!

Install

Install the component using Bower:

$ bower install greenyouse-datetime-local-input --save

Or download as ZIP.

Usage

  1. Import polyfill:

    <script src="bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
  2. Import custom element:

    <link rel="import" href="bower_components/datetime-local-input/datetime-local-input.html">
  3. Start using it!

    <datetime-local-input></datetime-local-input>

Options

Attribute Options Default Description
errorMessage string Please provide a full date An error message for when validation fails
label string Date The input label
value string the current time The datetime-local time

Methods

Method Parameters Returns Description
validate() None. Boolean Checks that the input value is a datetime-local time.

Development

In order to run it locally you'll need to fetch some dependencies and a basic server setup.

  1. Install bower & polyserve:

    $ npm install -g bower polyserve
  2. Install local dependencies:

    $ bower install
  3. Start development server and open http://localhost:8080/components/my-repo/.

    $ polyserve

History

For detailed changelog, check Releases.

Contribute!

There are a few issues that could use some help. Take a look at the issues for more.

License

MIT License

About

A polymer datetime-local component


Languages

Language:HTML 100.0%