/react-flatpickr

flatpickr for React

Primary LanguageJavaScript

NPM version License Dependency status

react-flatpickr

Flatpickr for React.

Usage

import 'flatpickr/dist/flatpickr.material_green.min.css'

import Flatpickr from 'react-flatpickr'
import { Component } from 'react'

class App extends Component {
  render() {
    return (
      <Flatpickr data-enable-time
        onChange={v => console.info(v)} />
    )
  }
}
  • flatpickr options: you can pass all flatpickr parameters to props.options
<Flatpickr options={{minDate: '2017-01-01'}} />

License

MIT