我们需要使用moment:
import moment from 'moment';
<Form>
<FormItem {...FormItemLayout} label='发布时间'>
{getFieldDecorator('releaseTime', {
initialValue: type == 'edit' ? moment(record.releaseTime, 'YYYY/MM/DD') : '',
rules: [{ required: true, message: "请输入发布时间" }],
})(
<DatePicker showTime={{ format: 'HH:mm' }} format='YYYY-MM-DD HH:mm' placeholder='请输入发布时间' />
)}
</FormItem>
</Form>