docs: update demos for Calendar

This commit is contained in:
Benjy Cui
2017-01-13 17:11:26 +08:00
parent eeae03d681
commit c4c1078f2d
5 changed files with 7 additions and 41 deletions
-1
View File
@@ -9,7 +9,6 @@ title:
一个通用的日历面板,支持年/月切换。
## en-US
A basic calendar component with Year/Month switch.
+1 -1
View File
@@ -1,5 +1,5 @@
---
order: 10
order: 2
title:
zh-CN: 卡片模式
en-US: Card
-33
View File
@@ -1,33 +0,0 @@
---
order: 1
title:
zh-CN: 自定义渲染
en-US: Custom Render
---
## zh-CN
`dateCellRender``monthCellRender` 函数来自定义需要渲染的数据。
## en-US
This component can be rendered by using `dateCellRender` and `monthCellRender` with the data you need.
````jsx
import { Calendar } from 'antd';
import moment from 'moment';
function dateCellRender(value) {
return <div>Custom date {value.date()}</div>;
}
function monthCellRender(value) {
return <div>Custom monthly {value.month()}</div>;
}
ReactDOM.render(
<Calendar defaultValue={moment('2010-10-10', 'YYYY-MM-DD')}
dateCellRender={dateCellRender} monthCellRender={monthCellRender}
/>
, mountNode);
````
+1 -1
View File
@@ -1,5 +1,5 @@
---
order: 4
order: 3
title:
zh-CN: 国际化
en-US: locale
+5 -5
View File
@@ -1,17 +1,17 @@
---
order: 2
order: 1
title:
zh-CN: 通知事项日历演示
en-US: A demo of Notice Calendar
zh-CN: 通知事项日历
en-US: Notice Calendar
---
## zh-CN
一个复杂的应用示例。
一个复杂的应用示例,用 `dateCellRender``monthCellRender` 函数来自定义需要渲染的数据
## en-US
A complex application.
This component can be rendered by using `dateCellRender` and `monthCellRender` with the data you need.
````jsx
import { Calendar } from 'antd';