Update Date.tsx

feat:新增月份显示渲染器,并修改对应examples
This commit is contained in:
AM_smart 2020-10-20 17:15:29 +08:00 committed by GitHub
parent db6b1e47c3
commit cbc580aacd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -119,3 +119,13 @@ export class TimeFieldRenderer extends DateField {
format: 'HH:mm'
};
}
@Renderer({
test: /(^|\/)month$/,
name: 'month-field'
})
export class MonthFieldRenderer extends DateField {
static defaultProps: Partial<DateProps> = {
...DateField.defaultProps,
format: 'MM'
};
}