Datepicker-input-react is a library based on create-react-library. This library return an input field who display a calendar when the input field is clicked, and return the selected date into input field.
Features include:
- Displays days of previous and next month
- Got a home button to reset date
- Extends to 50 years before and after actual year
npm i datepicker-input-react
import React from 'react'
import DatepickerInput from 'datepicker-input-react'
import 'datepicker-input-react/dist/index.css'
export default function DatepickerInputContainer() {
const onChange = (e) => {
console.log(e)
}
return (
<DatepickerInput onChange={(e)=>onChange(e)}/>
)
}
onChange
subscribe to date change ( required )
MIT © 2Bid