Exposed views date filter with offset not working as expected

Created on 2 July 2018, over 6 years ago
Updated 20 September 2024, 2 months ago

Problem/Motivation

When using a date/time filed as exposed filter using the "offset from the current time" setting, the filter doesn't display as I expected.

The setting for the filter are:

This leads to the filter being displayed like:

As you can see the dates are output in the filter as the relative text string. This can lead to problems if using a date selector dialog.

Proposed resolution

The output I expected is:

This has the dates computed and entered in the input element.

<!-- h3 id="summary-remaining-tasks">Remaining tasks</h3 --><!--h3 id="summary-ui-changes">User interface changes</h3 --><!-- h3 id="summary-api-changes">API changes</h3 --><!-- h3 id="summary-data-model-changes">Data model changes</h3 -->
🐛 Bug report
Status

Needs work

Version

11.0 🔥

Component
Views  →

Last updated about 5 hours ago

Created by

🇬🇧United Kingdom John Cook

Live updates comments and jobs are added and updated live.
  • views

    Involves, uses, or integrates with views. In Drupal 8 core, use the “VDC” tag instead.

  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

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