Multiple calls to drupal_add_js and drupal_add_library in the D8 branch cause invalid function errors. Also, the datepicker js code is not present. I have a patch

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

elgordogrande created an issue. See original summary.

elgordogrande’s picture

FileSize
5.01 KB

Attached is the patch to provide some D8 compatibility for adding the Datepicker widget.

geerlingguy’s picture

Title: Date Picker not working. » Date Picker not working
Status: Active » Needs review

I can confirm that this patch allows the BEF date filter to work correctly. Thanks!

geerlingguy’s picture

Status: Needs review » Needs work

Just noticed this patch also includes the changes from #2687773-7: Using checkboxes with an "is all of" filter fails if any options are selected; going to post an updated patch.

geerlingguy’s picture

Status: Needs work » Needs review
FileSize
3.94 KB
freeform.steph’s picture

Thank you for this patch - worked for me.

  • mikeker committed 9362976 on 8.x-3.x
    Issue #2779589 by elgordogrande, geerlingguy: Date Picker not working
    
mikeker’s picture

Assigned: elgordogrande » Unassigned
Status: Needs review » Fixed

Thank you @elgordogrande for the patch and @geerlingguy for noticing the bit from #2687773: Using checkboxes with an "is all of" filter fails if any options are selected in there!

Committed with the following very tiny doc fix:

diff --git a/js/bef_datepickers.js b/js/bef_datepickers.js
index 134db93..36fa448 100644
--- a/js/bef_datepickers.js
+++ b/js/bef_datepickers.js
@@ -1,7 +1,7 @@
 /**
- * @file better_exposed_filters.js
+ * @file bef_datepickers.js
  *
- * Provides some client-side functionality for the Better Exposed Filters module
+ * Provides jQueryUI Datepicker integration with Better Exposed Filters.
  */

 (function ($, Drupal, drupalSettings) {
sagesolutions’s picture

Patch #5 worked for me. Thanks @geerlingguy

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

Alienpruts’s picture

Could it be that this patch needs rerolling? I'm getting HUNK FAILED errors. More than willing to do the rerolling, but need to be sure if this happens to anyone else.

EDIT : my bad, I was trying to apply to 3.0-alpha-1, but failed to notice this patch was already included in the dev version. :)

chrotto’s picture

I do not think this is working.
With version 8.x-3.0-alpha1 and JQuery UI I get this error 'The website encountered an unexpected error. Please try again later.'
With version 8.x-3.0-alpha1+11-dev The datepicker show up but instead of 2016-12-14 it placed 20162016-12-14 in the date field