Field formatter is incompatible with smart dates provided by smart date module

Created on 23 August 2024, about 1 month ago
Updated 20 September 2024, 7 days ago

Problem/Motivation

I have a site where I use smart dates to provide date functionality for events. I had a request for ical links to be added to these events. I realised that the date ical module was not compatible with the smart date fields even though it seemed to be on the display mode. After looking at the viewElements method in the field formatter, I noticed that there was no logic to handle smart dates.

Proposed resolution

Add logic to determine method used to create array of elements depending on whether it is a smart date, date range or date. Add additional method to handle creation of array elements for smart dates.

I've written a small patch to handle this, I haven't tested this on a variety of use cases but it covers mine and could be used for a more comprehensive solution.

Feature request
Status

Fixed

Version

4.0

Component

Other

Created by

🇬🇧United Kingdom kristiantosney

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

Comments & Activities

Production build 0.71.5 2024