Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue https://github.com/openeuropa/oe_theme/issues/1037 #1452

Open
wants to merge 2 commits into
base: 4.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion js/ecl_datepicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
(function (ECL, Drupal) {
Drupal.behaviors.eclDatepicker = {
attach: function attach(context, settings) {
var elements = document.querySelectorAll('[data-ecl-datepicker-toggle]');
var elements = once('ecl-datepicker', document.querySelectorAll('[data-ecl-datepicker-toggle]'));
for (var i = 0; i < elements.length; i++) {
var datepicker = new ECL.Datepicker(elements[i], {
format: settings.oe_theme.ecl_datepicker_format
Expand Down
1 change: 1 addition & 0 deletions oe_theme.libraries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ ecl_datepicker:
js/ecl_datepicker.js: {}
dependencies:
- core/drupal
- core/once
- core/jquery

print:
Expand Down