1.0.3 • Published 6 years ago

preact-flatpickr v1.0.3

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

📅 Preact Flatpickr

Open Source Love Open Source Love PRs Welcome

Flatpicker component for Preact.

Getting Started

Install the package by running:

npm install --save preact-flatpickr

Example

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 (
      <div>
        <Flatpickr
          theme="dark"
          config={this.state.flatpickrConfig}
          onChange={() => console.log('You just changed the date.')}>
        </Flatpickr>
      </div>
    );
  }
}

API

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.

License

  • MIT

I'm new to Preact, so don't bite my head off. 😊

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago