mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-21 21:28:09 +08:00
502dac12aa
* docs: fix code * feat: lint * feat: prettier * feat: test * feat: review * feat: format html * feat: format html
15 lines
384 B
TypeScript
15 lines
384 B
TypeScript
import React from 'react';
|
|
import { Calendar } from 'antd';
|
|
import type { CalendarProps } from 'antd';
|
|
import type { Dayjs } from 'dayjs';
|
|
|
|
const App: React.FC = () => {
|
|
const onPanelChange = (value: Dayjs, mode: CalendarProps<Dayjs>['mode']) => {
|
|
console.log(value.format('YYYY-MM-DD'), mode);
|
|
};
|
|
|
|
return <Calendar onPanelChange={onPanelChange} />;
|
|
};
|
|
|
|
export default App;
|