import React from 'react';
import ReactDOM from 'react-dom';
import TimePicker from '..';
import moment from 'moment';
class ControlledTimePicker extends React.Component {
    constructor(props) {
        super(props);
        this.onSelect = value => {
            this.setState({ value });
            this.props.onChange(value);
        };
        this.state = {
            value: moment('12:00:00', 'HH:mm:ss', true),
        };
    }
    render() {
        return React.createElement(TimePicker, { value: this.state.value, onChange: this.onSelect });
    }
}
ReactDOM.render(React.createElement(ControlledTimePicker, { onChange: val => console.log(val.format('HH:mm:ss')) }), document.getElementById('time-picker-demo-4'));
