0.0.0 • Published 8 years ago

react-dtp v0.0.0

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

Demo

npm i redal-dtp --save

import React, { Component } from 'react';
import DatetimePicker from 'react-dtp';

class Demo extends Component {
  constructor(props, context) {
    super(props, context);
    this.handleChange = ::this.handleChange;
  }
  handleChange(value) {
    console.log(value);
  }
  render() {
    const { value } = this.state;
    return (
      <DatetimePicker
        onChange={this.handleChange}
      />
    );
  }
}
<DatetimePicker
  onChange // function(date),
  date // optional, instanceof Date. If omitted, default to current
/>