1.1.7 • Published 5 years ago
custom-react-flatpickr v1.1.7
react-flatpickr
Flatpickr for React.
Usage
import 'flatpickr/dist/themes/material_green.min.css'
import Flatpickr from 'react-flatpickr'
import { Component } from 'react'
class App extends Component {
constructor() {
super();
this.state = {
date: new Date()
};
}
render() {
const { date } = this.state;
return (
<Flatpickr data-enable-time
value={date}
onChange={date => { this.setState({date}) }} />
)
}
}
flatpickr options
: you can pass allflatpickr parameters
toprops.options
- All flatpickr hooks can be passed as a react prop, or to
props.options
<Flatpickr options={{minDate: '2017-01-01'}} />
Themes
Please import themes directly from the flatpickr
dependency. In most cases, you should just be able to import 'flatpickr/dist/themes/theme.css'
, but in some cases npm or yarn may install flatpickr
in node_modules/react-flatpickr/node_modules/flatpickr
. If that happens, removing your node_modules
dir and reinstalling should put flatpickr in the root node_modules
dir, or you can import from react-flatpickr/node_modules/flatpickr
manually.
License
MIT
1.1.7
5 years ago
1.1.6
5 years ago
1.1.5
5 years ago
1.1.4
5 years ago
1.1.3
5 years ago
1.1.2
5 years ago
1.1.1
5 years ago
1.1.0
5 years ago
0.0.13
6 years ago
0.0.12
6 years ago
0.0.11
6 years ago
0.0.10
6 years ago
0.0.9
6 years ago
0.0.8
6 years ago
0.0.7
6 years ago
0.0.6
6 years ago
0.0.5
6 years ago
0.0.4
6 years ago
0.0.3
6 years ago
0.0.2
6 years ago
0.0.1
6 years ago
1.0.2
6 years ago
1.0.1
6 years ago
1.0.0
6 years ago