mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-05 05:28:20 +08:00
108129641f
* feat: support range hover style * chore: adjust hover style * chore: cleanup * chore: update style * test: update snapshot * chore: fix style * chore: cleanup * chore: cleanup
20 lines
573 B
TypeScript
20 lines
573 B
TypeScript
import type { DatePickerProps } from 'antd';
|
|
import { DatePicker, Space } from 'antd';
|
|
import React from 'react';
|
|
|
|
const onChange: DatePickerProps['onChange'] = (date, dateString) => {
|
|
console.log(date, dateString);
|
|
};
|
|
|
|
const App: React.FC = () => (
|
|
<Space direction="vertical">
|
|
<DatePicker onChange={onChange} />
|
|
<DatePicker onChange={onChange} picker="week" />
|
|
<DatePicker onChange={onChange} picker="month" />
|
|
<DatePicker onChange={onChange} picker="quarter" />
|
|
<DatePicker onChange={onChange} picker="year" />
|
|
</Space>
|
|
);
|
|
|
|
export default App;
|