ant-design/components/calendar/index.en-US.md
Wei Zhu 77b78a9389 docs: Unify type naming (#4636)
* Unify name of ReactNode type in document

* Lowser all string type name

* Lowercase all number type name

* Lowercase all boolean type name

* Unify array type

* Lowercase all object type name

* Unify mutilple types
2017-01-20 20:10:50 +08:00

34 lines
1.3 KiB
Markdown

---
category: Components
type: Data Display
cols: 1
title: Calendar
---
Container for displaying data in calendar form.
## When To Use
When data is in the form of date, such as schedule, timetable, prices calendar, Lunar calendar. This component also supports Year/Month switch.
## API
```html
<Calendar
dateCellRender={dateCellRender}
monthCellRender={monthCellRender}
onPanelChange={onPanelChange}
/>
```
| Property | Description | Type | Default |
|--------------|----------------|----------|--------------|
| value | set date | [moment](http://momentjs.com/) | current date |
| defaultValue | set default date | [moment](http://momentjs.com/) | default date |
| mode | can be set to month or year | string | month |
| fullscreen | to set whether full-screen display | boolean | true |
| dateCellRender | to set the way of renderer the date cell | function(date: moment): ReactNode | - |
| monthCellRender | to set the way of renderer the month cell | function(date: moment): ReactNode | - |
| locale | set locale | object | [default](https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json) |
| onPanelChange| the callback when panel change | function(date: moment, mode: string) | - |