Integrate with date_popup

Created on 27 June 2023, about 1 year ago
Updated 12 July 2023, 12 months ago

Problem/Motivation

modules provide (HTML5) Datepicker integration for date filter fields in views.

I ran into the issue that both modules didn't work and created the following issues:
📌 Add a static class for Smart Date, other contrib compatibility Fixed
💬 Doesn't work with smart_date module Closed: works as designed

Finally, in date_popup @larowlan found the reason: smart_date wins the race for the override.
See issues for details.

Steps to reproduce

  1. Install smart_date module
  2. Install date_popup or date_filter module
  3. Create a view with a filter on a date/datetime field, like "node:created" and see the HTML5 date picker from the both modules doesn't appear. Nor do the options from the modules appear
  4. Uninstall smart_date and see the both other modules do their job just fine
  5. Read the linked issues for technical details

Proposed resolution

As I can't find any other good solution to make the implementations compatible, I think it would be best to simply integrate the functionality from date_picker or date_popup into this module and provide a HTML5 date picker into smart_date for date / date_time (exposed) view filters.

Then there would be no need for these modules anymore and the issue is solved.
Which of the both modules implementations is better, should be investigated before. I think both are fine.

On the (very) long view, I think core should provide the HTML5 datepicker through: ✨ [PP-2] Use form element of type date instead textfield when selecting a date in an exposed filter Needs work

Remaining tasks

User interface changes

API changes

Data model changes

Workaround

If anyone needs a quick and ugly solution out of the box, use https://www.drupal.org/project/better_exposed_filters → which uses jquery_datepicker and works in combination with smart_date. But jquery_datepicker shouldn't be an option anymore and the modules shouldn't be incompatible.

✨ Feature request
Status

Fixed

Version

4.0

Component

Code

Created by

🇩🇪Germany Anybody Porta Westfalica

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

Comments & Activities

Production build 0.69.0 2024