mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-17 10:28:06 +08:00
16 lines
437 B
TypeScript
16 lines
437 B
TypeScript
|
import React from 'react';
|
||
|
import { TimePicker } from 'antd';
|
||
|
import type { Dayjs } from 'dayjs';
|
||
|
import dayjs from 'dayjs';
|
||
|
import customParseFormat from 'dayjs/plugin/customParseFormat';
|
||
|
|
||
|
dayjs.extend(customParseFormat);
|
||
|
|
||
|
const onChange = (time: Dayjs, timeString: string) => {
|
||
|
console.log(time, timeString);
|
||
|
};
|
||
|
|
||
|
const App: React.FC = () => <TimePicker onChange={onChange} changeOnScroll needConfirm={false} />;
|
||
|
|
||
|
export default App;
|