ant-design/components/time-picker/demo/need-confirm.tsx
KumJungMin 84ee56f708
docs: add needConfirm option on time-picker docs (#48945)
* docs: add needConfirm option on time-picker docs

* docs: add onchange event to catch time changed

* docs: change file name to kebab case

* test: add test snapshot

* docs: delete needConfirm true demo in datePicker

* docs: add needConfirm true in demo

* test: delete old need confirm snapshot

* docs: update need-confirm snapshot

* test: update test snapshot
2024-05-19 15:58:05 +08:00

12 lines
312 B
TypeScript

import React from 'react';
import type { TimePickerProps } from 'antd';
import { TimePicker } from 'antd';
const onChange: TimePickerProps['onChange'] = (time, timeString) => {
console.log(time, timeString);
};
const App: React.FC = () => <TimePicker onChange={onChange} needConfirm />;
export default App;