ant-design/components/time-picker/demo/value.tsx
叶枫 502dac12aa
docs: format code (#48309)
* docs: fix code

* feat: lint

* feat: prettier

* feat: test

* feat: review

* feat: format html

* feat: format html
2024-04-08 14:04:08 +08:00

16 lines
349 B
TypeScript

import React, { useState } from 'react';
import { TimePicker } from 'antd';
import type { Dayjs } from 'dayjs';
const App: React.FC = () => {
const [value, setValue] = useState<Dayjs | null>(null);
const onChange = (time: Dayjs) => {
setValue(time);
};
return <TimePicker value={value} onChange={onChange} />;
};
export default App;