smart_date_format not working for date range

Created on 2 December 2022, about 2 years ago
Updated 20 May 2024, 8 months ago

I have a Smart date range field (field.event.dates) that I want to apply the smart date format to in twig. When I use {{node.field_event_dates|smart_date_format('compact')}} I get the following error:

Exception: Object of type Drupal\smart_date\Plugin\Field\FieldType\SmartDateFieldItemList cannot be printed. in Drupal\Core\Template\TwigExtension->escapeFilter() (line 454 of core/lib/Drupal/Core/Template/TwigExtension.php).

I have looked for further documentation on the smart_date_format filter but haven't been able to find any specifically. I'm following the syntax I found in your comments on another issue: https://www.drupal.org/node/3272022 β†’

Any help is much appreciated

πŸ’¬ Support request
Status

Needs work

Version

3.6

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States choneyse

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024