mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-01 11:39:28 +08:00
4026221d45
* deps: upgrade TimePicker * deps: upgrade DatePicker * deps: upgrade Calendar * fix: moment should work with LocaleProvider * feat: update API of TimePicker * feat: update Calendar's APIs * feat: update DatePicker's APIs * doc: update demo * revert: add dateString and timeString and so on * feat: add Calendar[defaultValue] * feat: add defaultPickerValue * docs: update docs about date picker * feat: set moment locale to zh-cn automatically
1.3 KiB
1.3 KiB
category | type | cols | title |
---|---|---|---|
Components | Views | 1 | Calendar |
When to use 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
<Calendar
dateCellRender={dateCellRender}
monthCellRender={monthCellRender}
onPanelChange={onPanelChange}
/>
Property | Description | Type | Default |
---|---|---|---|
value | set date | moment | current date |
defaultValue | set default date | moment | 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 | defualt |
onPanelChange | the callback when panel change | function(date: moment, mode: string) | - |