Skip to content

Latest commit

 

History

History
39 lines (31 loc) · 1.14 KB

overview.md

File metadata and controls

39 lines (31 loc) · 1.14 KB

Inputs >> Input Date >> Overview ||10

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

import { html } from '@mdjs/mdjs-preview';
import { MinDate, MinMaxDate, MaxDate } from '@lion/form-core';
import { loadDefaultFeedbackMessages } from '@lion/validate-messages';
import { formatDate } from '@lion/localize';
import '@lion/input-date/define';
export const main = () => html` <lion-input-date label="Date"></lion-input-date> `;

Features

  • Based on our input
  • Makes use of formatDate for formatting and parsing.
  • Option to override 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

Installation

npm i --save @lion/input-date
import { LionInputDate } from '@lion/input-date';
// or
import '@lion/input-date/define';