mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-15 08:59:15 +08:00
18 lines
492 B
TypeScript
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;
|