Datepicker widget not attaching in Drupal 11 (jquery_ui_datepicker 2.x)

Created on 15 July 2025, 12 days ago

### Problem/Motivation
After installing **jquery_ui 2.x** and **jquery_ui_datepicker 2.x** on **Drupal 11.2**, the **“Datepicker (jQuery UI)”** option never appears when configuring a Views exposed filter on a date field.
Because the widget isn’t available, site builders can’t offer a calendar picker to editors.

---

### Steps to reproduce
1. Fresh Drupal 11.2 site.
2. `composer require drupal/jquery_ui:^2.2 drupal/jquery_ui_datepicker:^2.1`
3. `drush en jquery_ui jquery_ui_datepicker -y && drush cr`
4. Create a **View** showing *Articles*; add a **Date** field (e.g., `created`).
5. Add that date field as an **exposed filter**.
6. Open the **Widget** select list in the filter settings.

---

### Expected result
The list should include **“Datepicker (jQuery UI)”** (or similar) so the calendar widget can be chosen.

### Actual result
Only the default widgets (text inputs, machine‑name, etc.) are shown—**no Datepicker option**.
No JavaScript errors appear in the browser console or Drupal logs.

---

### Environment
| Item | Version |
|------|---------|
| Drupal | 11.2.0 |
| PHP | 8.3.8 |
| jquery_ui | 2.2.0 |
| jquery_ui_datepicker | 2.1.1 |
| Views UI | Core (enabled) |
| Browser | Chrome 138 / Firefox 127 |

---

### Proposed resolution
Determine why `jquery_ui_datepicker` does not register its widget with Views on Drupal 11.
Possible causes:
* Outdated hook or plugin definition (e.g., `hook_views_field_widget_info`).
* Missing `libraries-override` for core’s asset resolver in 11.x.

---

### Remaining tasks
- [ ] Replicate on latest `2.x-dev`.
- [ ] Provide patch / merge request that registers the widget and adds automated test coverage.
- [ ] Verify that selecting the widget loads the calendar properly on the edit form.

---

*Happy to test any patch or provide extra details.*

🐛 Bug report
Status

Active

Version

11.1 🔥

Component

views.module

Created by

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

Comments & Activities

Production build 0.71.5 2024