mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-04 05:44:58 +00:00
Fix errors in custom field rendering and administration
This commit is contained in:
@@ -68,7 +68,7 @@ class CustomFieldDate extends AbstractCustomField
|
||||
{
|
||||
$validatorFunction = static function ($value, ExecutionContextInterface $context) {
|
||||
try {
|
||||
$date = new \DateTime($value);
|
||||
$date = new \DateTime((string) $value);
|
||||
} catch (\Exception) {
|
||||
$context->buildViolation('The expression "%expression%" is invalid', [
|
||||
'%expression%' => $value,
|
||||
@@ -125,7 +125,7 @@ class CustomFieldDate extends AbstractCustomField
|
||||
return $date->format('Y-m-d');
|
||||
|
||||
default:
|
||||
$template = 'ChillCustomFieldsBundle:CustomFieldsRendering:date.'
|
||||
$template = '@ChillCustomFields/CustomFieldsRendering/date.'
|
||||
.$documentType.'.twig';
|
||||
|
||||
return $this->templating
|
||||
|
Reference in New Issue
Block a user