You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

712 B

order title
1 [{zh-CN 自定义渲染} {en-US Custom Render}]

zh-CN

dateCellRendermonthCellRender 函数来自定义需要渲染的数据。

en-US

This component can be rendered by using dateCellRender and monthCellRender with the data you need.

import { Calendar } from 'antd';
import moment from 'moment';

function dateCellRender(value) {
  return <div>自定义日数据 {value.date()}</div>;
}

function monthCellRender(value) {
  return <div>自定义月数据 {value.month()}</div>;
}

ReactDOM.render(
  <Calendar defaultValue={moment('2010-10-10', 'YYYY-MM-DD')}
    dateCellRender={dateCellRender} monthCellRender={monthCellRender}
  />
, mountNode);