Refactor to support more widget types, add datetime_timestamp

Created on 15 September 2021, about 3 years ago
Updated 21 September 2023, about 1 year ago

Problem/Motivation

The widget form alter code is repeated for widgets datetime_default & daterange_default - this can be refactored into one hook_widget_form_alter() and check the widget type against a list of supported widgets. Then, we can easily add support for more widget types - e.g. datetime_timestamp used for "Authored On" (created) fields and datetime_timestamp_no_default used for Scheduler.

Proposed resolution

Attached patch refactors the widget form alter code and adds support for datetime_timestamp & datetime_timestamp_no_default widget types.

Remaining tasks

It would be better to invoke a hook to collect supported widget types, and implement it in the Scheduler module to add support for its widget type.

💬 Support request
Status

Fixed

Version

2.0

Component

Code

Created by

🇨🇦Canada bgilhome Victoria

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