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