0.6.0 • Published 8 years ago

@lendinghome/react-pikaday v0.6.0

Weekly downloads
-
License
MIT
Repository
github
Last release
8 years ago

react-pikaday

A component wrapper around Pikaday.

View Example

Importing

Normal

If you're using Browserify, or want to bring a custom Pikaday stylesheet, just require this component like any other module:

var Pikaday = require('react-pikaday');

Bundled

If you're using webpack with a configured style-loader for CSS, you can actually require this component along with the Pikaday CSS in one go:

var Pikaday = require('react-pikaday/bundled');

Usage

/** @jsx React.DOM */
var React = require('react');
var Pikaday = require('react-pikaday');

var MyComponent = React.createClass({
  getInitialState: function() {
    return {
      date: null
    };
  },

  handleChange: function(date) {
    this.setState({
      date: date
    });
  },

  render: function() {
    var date = this.state.date;

    return (
      <div>
        <p>
          The date is {date.toDateString()}
        </p>
        <Pikaday value={date} onChange={this.handleChange} />
      </div>
    );
  }
});

Properties

0.6.0

8 years ago

0.5.1

8 years ago

0.5.0

8 years ago

0.4.0

8 years ago

0.3.2

8 years ago