1.0.3 • Published 5 years ago

date-mask v1.0.3

Weekly downloads
1
License
ISC
Repository
-
Last release
5 years ago

Description

date-mask is an react package allowing to format user input date by ensuring a predefined format.

Installation

npm install date-mask --save

How to use it

// With ES6
let Input from 'date-mask'

// With ES5

var Input = require('date-mask')

<Input />

and we can passe all properties that normal input have throught props:

<Input onChange={handleInputChange} value="12/06/1989" />

if we need to customize separator we have choice between those 3 separators ('/', '-', '.')

<Input separator='-' />

we have also the possibility to define date format where year is left yyyy/dd/mm, just by adding yearFirst property

<Input separator='-' yearFirst />
1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago