Skip to content
This repository has been archived by the owner on Sep 19, 2024. It is now read-only.

greenyouse/datetime-local-input

Repository files navigation

<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