From fd662a266b57a3fe7c765a66ae69068fe95ca32d Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Mon, 18 Mar 2019 16:04:45 +0100 Subject: [PATCH] fix different attribute-name on server- and client-side: data_format has to be changed in customfields too --- api/src/Etemplate/Widget/Customfields.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/src/Etemplate/Widget/Customfields.php b/api/src/Etemplate/Widget/Customfields.php index b3dec7cfa4..e295f2c59b 100644 --- a/api/src/Etemplate/Widget/Customfields.php +++ b/api/src/Etemplate/Widget/Customfields.php @@ -300,11 +300,11 @@ class Customfields extends Transformer case 'date-time': if (!empty($field['values']['format'])) { - $widget->attrs['dataformat'] = $field['values']['format']; + $widget->attrs['data_format'] = $field['values']['format']; } else { - $widget->attrs['dataformat'] = $type == 'date' ? 'Y-m-d' : 'Y-m-d H:i:s'; + $widget->attrs['data_format'] = $type == 'date' ? 'Y-m-d' : 'Y-m-d H:i:s'; } if($field['values']['min']) $widget->attrs['min'] = $field['values']['min']; if($field['values']['max']) $widget->attrs['min'] = $field['values']['max'];