| .. | ||
| src | ||
| stories | ||
| test | ||
| CHANGELOG.md | ||
| index.js | ||
| lion-input-date.js | ||
| package.json | ||
| README.md | ||
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>