Flatpickr component for Preact.
npm install preact-flatpickr


> Flatpicker component for Preact.
Install the package by running:
```
npm install --save preact-flatpickr
javascript
import { Component } from 'preact';
import Flatpickr from 'preact-flatpickr';export default class App extends Component {
constructor(props) {
super(props)
this.state = {
flatpickrConfig: {
'weekNumbers': true
}
}
}
render() {
return (
theme="dark"
config={this.state.flatpickrConfig}
onChange={() => console.log('You just changed the date.')}>
);
}
}
`$3
Every Flatpickr configuration option is available.
You can check out every option here.
You can also set themes via the
theme` attribute. Learn more about the options here.I'm new to Preact, so don't bite my head off. 😊