mirror of
https://gitee.com/nocobase/nocobase.git
synced 2024-12-04 13:18:55 +08:00
fix: date field does not show time configuration
This commit is contained in:
parent
bfa998e478
commit
d8d4ef177a
@ -33,6 +33,13 @@ export function fields2properties(fields = [], options: any = {}) {
|
||||
title: field.title,
|
||||
required: field.required,
|
||||
};
|
||||
if (field.dateFormat) {
|
||||
set(data, 'x-component-props.format', field.dateFormat);
|
||||
}
|
||||
if (field.showTime) {
|
||||
set(data, 'x-component-props.showTime', true);
|
||||
field.timeFormat && set(data, 'x-component-props.format', `${field.dateFormat} ${field.timeFormat}`);
|
||||
}
|
||||
if (field.createOnly && mode !== 'create') {
|
||||
set(data, 'x-component-props.disabled', true);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user