mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-04 08:59:40 +08:00
6776bb8916
* docs: update demo * chore: add script * test: fix demo test * docs: convert demos * chore: move script * test: remove react-dom import * chore: update deps * docs: update riddle js * test: fix image test * docs: fix riddle demo
25 lines
382 B
Markdown
25 lines
382 B
Markdown
---
|
|
order: 0
|
|
title:
|
|
zh-CN: 基本
|
|
en-US: Basic
|
|
---
|
|
|
|
## zh-CN
|
|
|
|
一个通用的日历面板,支持年/月切换。
|
|
|
|
## en-US
|
|
|
|
A basic calendar component with Year/Month switch.
|
|
|
|
```jsx
|
|
import { Calendar } from 'antd';
|
|
|
|
function onPanelChange(value, mode) {
|
|
console.log(value.format('YYYY-MM-DD'), mode);
|
|
}
|
|
|
|
export default () => <Calendar onPanelChange={onPanelChange} />;
|
|
```
|