lion/packages/input-date
CircleCI d705a35eda chore: release new versions
- @lion/button@0.4.1
 - @lion/calendar@0.5.1
 - @lion/checkbox-group@0.4.0
 - @lion/checkbox@0.2.11
 - @lion/choice-input@0.4.9
 - @lion/field@0.6.8
 - @lion/fieldset@0.5.3
 - @lion/form-system@0.2.9
 - @lion/form@0.3.9
 - @lion/input-amount@0.4.0
 - @lion/input-date@0.4.0
 - @lion/input-datepicker@0.6.1
 - @lion/input-email@0.4.0
 - @lion/input-iban@0.4.0
 - @lion/input@0.4.0
 - @lion/option@0.3.9
 - @lion/popup@0.4.4
 - @lion/radio-group@0.4.0
 - @lion/radio@0.2.11
 - @lion/select-rich@0.8.1
 - @lion/select@0.4.0
 - @lion/switch@0.3.11
 - @lion/textarea@0.4.0
2019-12-04 16:17:27 +00:00
..
src feat: finalize validation and adopt it everywhere 2019-11-18 15:30:08 +01:00
stories feat: finalize validation and adopt it everywhere 2019-11-18 15:30:08 +01:00
test feat: integrate and pass automated a11y testing 2019-12-03 15:15:01 +01:00
CHANGELOG.md chore: release new versions 2019-12-04 16:17:27 +00:00
index.js feat: release inital public lion version 2019-04-26 10:37:57 +02:00
lion-input-date.js feat: release inital public lion version 2019-04-26 10:37:57 +02:00
package.json chore: release new versions 2019-12-04 16:17:27 +00:00
README.md feat: finalize validation and adopt it everywhere 2019-11-18 15:30:08 +01:00

Input Date

lion-input-date component is based on the generic text input field. Its purpose is to provide a way for users to fill in a date.

Features

  • based on lion-input
  • makes use of formatDate for formatting and parsing.
  • option to overwrite locale to change the formatting and parsing
  • default label in different languages
  • can make use of date specific validators with corresponding error messages in different languages
    • IsDate (default)
    • MinDate
    • MaxDate
    • MinMaxDate

How to use

Installation

npm i --save @lion/input-date
import '@lion/input-date/lion-input-date.js';

// validator import example
import { Required, MinDate } from '@lion/validate';

Example

<lion-input-date
  name="date"
  .validators="${[new Required(), new MinDate(new Date('2018/05/24'))]}"
></lion-input-date>