React的Flatpicker - react-flatpickr

2016-10-20      126      JavaScript
项目简介

react-flatpickr

Flatpickr for React.

使用方法

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:你可以传递所有的flatpickr parameters到props.options
<Flatpickr options={{minDate: '2017-01-01'}} />