adopted-ember-addons / ember-pikaday

A datepicker component for Ember CLI projects.
MIT License
159 stars 169 forks source link

This querySelector is wrong formated and raises a DOMException #529

Open ChristianGreinke opened 2 years ago

ChristianGreinke commented 2 years ago

This code line creates a wrongly formated selector for document.querySelector and results into a DOMException

https://github.com/adopted-ember-addons/ember-pikaday/blob/19366ea66e9037fe9410c65369e9bb796a4b5ed6/addon/helpers/pikaday.js#L40

for example day=5 gives

'td[data-day="'5'"]:not(.is-outside-current-month) button}'

which is wrong in two places the last } is too much and encasing the day placeholder with ' also brakes the selector. The right code line could look like this

`td[data-day="${day}"]:not(.is-outside-current-month) button`