Better exposed filter should allow configuring all HTML date element properties

Created on 12 August 2020, about 4 years ago
Updated 6 September 2024, 1 day ago

Problem/Motivation

If I want to add datepicker options to BEF, how can I add that? I see that currently the Datepicker plugin has hardcoded "datepicker_options" in Drupal Settings JavaScript.


Steps to reproduce

  1. Add a date field into Drupal Views as exposed filter.
  2. In the "Advanced" section, "Exposed form style:Better Exposed Filters" and set the date field as jQuery UI datepicker.
  3. I want to show the dates for a specific range, say for example Past 30 years to past 6 months from today ({ minDate: '-30Y', maxDate: "-6M" }).
  4. There is no option to do that.

Proposed resolution

Add public function buildConfigurationForm(array $form, FormStateInterface $form_state) to the "bef_datepicker" plugin and add required field(s) and configuration to address the "datepicker_options"

Remaining tasks

TBD

User interface changes

TBD

API changes

TBD

Data model changes

TBD

🐛 Bug report
Status

Needs work

Version

7.0

Component

Code

Created by

🇮🇳India aneek

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

Merge Requests

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