@lilclemclem/light-date-picker

1.2.2 • Public • Published

light-date-picker

light date picker is an simple date picker for your reactjs project

Installation :

npm install @lilclemclem/light-date-picker@latest

Usage :

Example 1 - no Custom Handler :

const [date , setDate] = useState("")
return(
 <DatePicker setDate={setDate}/>
)

Example 2 - Custom Handler :

const CustomHandler = (year , month , day) => {
    //formatting to have dd/mm/yyyy
    return (`${day}/${month}/${year}`)
}
/*custom handler take 3 arguments : 
    - year
    - month
    - day

 and always have to return a string as input element value
*/
const [date , setDate] = useState("")

return(
 <DatePicker handleclick={CustomHandler} setDate={setDate}/>
)

Readme

Keywords

none

Package Sidebar

Install

npm i @lilclemclem/light-date-picker

Weekly Downloads

1

Version

1.2.2

License

ISC

Unpacked Size

28 kB

Total Files

10

Last publish

Collaborators

  • lilclemclem