Incompatibility with Gin admin theme

Created on 5 May 2025, 2 months ago

Problem/Motivation

It seems that this module is not working correctly when used together with Gin admin theme - date fields starts behave incorrectly.

Steps to reproduce

1. Install and enable Views Date Filter module
2. Install and enable Gin admin theme
3. Create view with exposed date filter and exposed operator
4. Observe the results:
- if operators are not limited, date filters are visible for a moment when page is loading and disappear when the page is ready
- different operastors allowed on the "limit the available operators" will allow the fields to show up, but they are displayed incorrectly:

๐Ÿ› Bug report
Status

Active

Version

1.0

Component

Code

Created by

๐Ÿ‡ต๐Ÿ‡ฑPoland besek

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

Comments & Activities

  • Issue created by @besek
  • ๐Ÿ‡จ๐Ÿ‡ฆCanada joelpittet Vancouver

    We encountered this issue and investigated further. It turns out the problem is not limited to the Gin themeโ€”although Gin does interfere with things somewhat. Even when using other admin themes, the #states visibility logic for the min and max input fields is not applied correctly.

    Specifically, the data-drupal-states attribute is not being attached to the correct element. In the case of the Gin theme, it's being rendered on a wrapping <div> instead of the actual <input> elements for the min and max fields. And without the Gin theme, they don't have the data-drupal-states attribute at all!

    As a result, the visibility behaviour breaks: instead of hiding just the inputs when the selected operator doesn't require them (e.g., not using "Between" or "Not Between"), the entire filter may hide unexpectedly (Gin theme), or the fields may appear when they shouldn't (all the other themes).

  • ๐Ÿ‡จ๐Ÿ‡ฆCanada joelpittet Vancouver
  • ๐Ÿ‡จ๐Ÿ‡ฆCanada joelpittet Vancouver

    Postponing this on ๐Ÿ› Undefined array key "#type" in Drupal\Core\Form\FormHelper Active please see if the latest MR resolves this issue for you.

Production build 0.71.5 2024