--- order: 2 title: zh-CN: 日期格式 en-US: Date Format --- ## zh-CN 使用 `format` 属性,可以自定义日期显示格式。 ## en-US We can set the date format by `format`. ```jsx import { DatePicker, Space } from 'antd'; import moment from 'moment'; const { RangePicker } = DatePicker; const dateFormat = 'YYYY/MM/DD'; const weekFormat = 'MM/DD'; const monthFormat = 'YYYY/MM'; const dateFormatList = ['DD/MM/YYYY', 'DD/MM/YY']; const customFormat = value => `custom format: ${value.format(dateFormat)}`; const customWeekStartEndFormat = value => `${moment(value).startOf('week').format(weekFormat)} ~ ${moment(value) .endOf('week') .format(weekFormat)}`; export default () => ( ); ```