Problem/Motivation

In Drupal 11.1.1, an error occurs when using the datepicker.

Uncaught TypeError: a.isArray is not a function at k._resolveDaysOfWeek (bootstrap-datepicker.min.js:7:3190)

Steps to reproduce

In /admin/config/views-year-filter/settings, configure the module settings to use the Bootstrap Datepicker.
Create a view page that uses the Views year filter in the public filter.

Proposed resolution

Since Drupal 11, the core jquery version has changed to v4.0.0-beta.2 and does not seem to be working.
Change the version of the datepicker library from 1.9.0 to 1.10.0.

CommentFileSizeAuthor
views-year-filter-fix-libraries.patch866 bytesterao3

Comments

terao3 created an issue. See original summary.

  • berramou committed e89d8532 on 2.0.x
    Issue #3508340: datepicker dependent library compatibility
    
berramou’s picture

Thank you @terao3 for the report and the patch!

berramou’s picture

Status: Active » Fixed
berramou’s picture

Status: Fixed » Closed (fixed)
terao3’s picture

@berramou
I am happy to contribute.
Thank you, too, for the great module.

will_frank’s picture

Two questions:
Will this patch work for both Drupal 11 and also Drupal 10?
If so will you be issuing a new version of this module?
Thanks - we've hit this issue also for Drupal 11. I'll try the patch on
Drupal 11 seems it works. But we're still on Drupal 10 so it would
be great if we had a new version of the module that works on both
releases of Drupal.

terao3’s picture

@will_frank
As far as I have confirmed, it seems to work even when this patch is enabled on “10.3.10”.

I have not been able to check all 10 series versions... Perhaps it will work with both 10 and 11

berramou’s picture

Hello @will_frank,
I created the release 2.1.6 that contain this issue fix.
and yes i tested it on Drupal 10.3 too it works perfectly like @terao3, but i didn't test other versions of Drupal 10.
If the version 2.1.6 didn't work for you you can install previous version they had the datepicker library 1.9.0 that work with old jqurey versions.

will_frank’s picture

It works for us on Drupal 10.4.2 also. Looks good.

will_frank’s picture

...and it works great on Drupal core 11.1.3. Nice work.

berramou’s picture

Thank you @will_frank for the testing.
Glad that this module is helpful for your projects!