import React from 'react'; import ReactDOM from 'react-dom'; import TimePicker2 from '..'; import dayjs from 'dayjs'; import { Button, Field } from '../..'; class Demo extends React.Component { field: any; constructor(props) { super(props); this.field = new Field(this); } onClick = () => { const value = this.field.getValue('time-picker'); console.log(value.format('HH:mm:ss')); }; render() { const { init } = this.field; const props = init('time-picker', { rules: [{ required: true, message: 'Time Required' }], initValue: dayjs('00:00:00', 'HH:mm:ss', true), }); return (