diff --git a/src/Http/Controllers/GuestEntryController.php b/src/Http/Controllers/GuestEntryController.php index 3f0b8fa..b973262 100644 --- a/src/Http/Controllers/GuestEntryController.php +++ b/src/Http/Controllers/GuestEntryController.php @@ -215,16 +215,12 @@ protected function processField(Field $field, $key, $value, $request): mixed $value = $this->uploadFile($key, $field, $request); } - if ( - $value - && $field - && $field->fieldtype() instanceof DateFieldtype - ) { + if ($value && $field && $field->fieldtype() instanceof DateFieldtype) { $format = $field->fieldtype()->config( 'format', strlen($value) > 10 ? $field->fieldtype()::DEFAULT_DATETIME_FORMAT : $field->fieldtype()::DEFAULT_DATE_FORMAT ); - + $value = Carbon::parse($value)->format($format); }