ant-design/components/date-picker/demo/needConfirm.tsx
二货爱吃白萝卜 cbf2242065
enhance: New Picker no need needConfirm when multiple (#47275)
* docs: more and more

* chore: bump rc-picker

* test: update snapshot

* chore: multiple style

* chore: fix removeIcon

* test: update snapshot

* test: update testcase

* test: update snapshot

* chore: cleanup
2024-02-01 16:26:38 +08:00

18 lines
492 B
TypeScript

import React from 'react';
import type { DatePickerProps } from 'antd';
import { DatePicker, Space } from 'antd';
import type { Dayjs } from 'dayjs';
const onChange: DatePickerProps<Dayjs[]>['onChange'] = (date, dateString) => {
console.log(date, dateString);
};
const App: React.FC = () => (
<Space direction="vertical" size={12}>
<DatePicker onChange={onChange} needConfirm />
<DatePicker onChange={onChange} showTime needConfirm={false} />
</Space>
);
export default App;