reactanggal
v1.0.4
Published
A date picker component for React
Downloads
35
Maintainers
Readme
reactanggal
A date picker component for React
- Keyboard accessibility support
Install
npm install --save reactanggalUsage
import React, { useState } from 'react'
import Reactanggal from 'reactanggal'
import 'reactanggal/dist/reactanggal.css'
const App = () => {
const [date, setDate] = useState(new Date())
return (
<Reactanggal
selected={date}
onChange={setDate}
/>
)
}Props
| Key | Default Value | Type | Description
| --- | -------- | ---- | ----------- |
| selected | undefined | Date / null / undefined | Selected date value
| onChange | undefined | function | Handle date changes
| minDate | undefined | Date / null / undefined | Set minimum date to select & disable earlier dates
| maxDate | undefined | Date / null / undefined | Set maximum date to select & disable later dates
| showOutsideMonth | false | boolean | Show or hide dates that fall outside the current month
License
MIT © andarasophan
