2.1.4 • Published 9 years ago

react-pikaday-component v2.1.4

Weekly downloads
318
License
MIT
Repository
-
Last release
9 years ago

ReactPikadayComponent

build status npm version Download Count

Universal React component wrapper around Pikaday.js datepicker.

Install

npm install react pikaday react-pikaday-component --save

Usage

import React from 'react';
import ReactDOM from 'react-dom';
import DatePicker from 'react-pikaday-component';

class App extends React.Component {
  constructor() {
    super();

    this.state = {};
  }

  onDateChange(date) {
    this.setState({ date });
  }

  render() {
    const { date } = this.state;

    return (
      <div>
        <DatePicker 
            placeholder="Select Date"
            format="YYYY/MM/DD"
            maxDate={new Date('2020-07-26')}
            value={new Date(date)}
            onChange={::this.onDateChange}
        />
    </div>
    );
  }
}

ReactDOM.render(
    <App />,
    document.getElementById('example')
);

Properties

  • value
  • onChange
  • valueLink
  • Pikaday configuration options (except onSelect and field)
  • other input attributes like className, name, placeholder, disabled and readOnly

MIT Licensed

2.1.4

9 years ago

2.1.3

9 years ago

2.1.2

9 years ago

2.1.1

9 years ago

2.1.0

9 years ago

2.0.2

9 years ago

2.0.1

9 years ago

2.0.0

9 years ago

1.0.0

9 years ago

0.2.2

10 years ago

0.2.1

10 years ago

0.2.0

10 years ago

0.1.4

10 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago