rc-time-picker@3.1.0

React TimePicker

/* eslint no-console:0 */

import 'rc-time-picker/assets/index.css';

import React from 'react';
import ReactDom from 'react-dom';
import TimePicker from 'rc-time-picker';

class App extends React.Component {
  state = {
    open: false,
  };
  setOpen = ({ open }) => {
    this.setState({ open });
  }
  toggleOpen = () => {
    this.setState({
      open: !this.state.open,
    });
  }
  render() {
    return (
      <div>
        <button onClick={this.toggleOpen}>Toggle open</button>
        <TimePicker
          open={this.state.open}
          onOpen={this.setOpen}
          onClose={this.setOpen}
          focusOnOpen
        />
      </div>
    );
  }
}

ReactDom.render(
  <App />,
  document.getElementById('__react-content')
);
Fork me on GitHub