mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 23:00:56 +01:00
Api: Fix custom date & datetime fields with data format set caused a JS error
TypeError: Cannot set property format of #<Et2DateTime> which has only a getter
This commit is contained in:
parent
a35e80c73a
commit
0f77eca5c4
@ -634,11 +634,19 @@ export class et2_customfields_list extends et2_valueWidget implements et2_IDetac
|
||||
|
||||
_setup_date(field_name, field, attrs) {
|
||||
attrs.data_format = field.values && field.values.format ? field.values.format : 'Y-m-d';
|
||||
if(field.values?.format)
|
||||
{
|
||||
delete field.values.format;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
_setup_date_time( field_name, field, attrs)
|
||||
{
|
||||
attrs.data_format = field.values && field.values.format ? field.values.format : 'Y-m-d H:i:s';
|
||||
if(field.values?.format)
|
||||
{
|
||||
delete field.values.format;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
_setup_htmlarea( field_name, field, attrs)
|
||||
|
Loading…
Reference in New Issue
Block a user