chrisdavies / tiny-date-picker

A small, modern, dependency-free date picker
https://chrisdavies.github.io/tiny-date-picker/
415 stars 87 forks source link

Turbolinks issue #70

Closed meneerprins closed 6 years ago

meneerprins commented 6 years ago

With the latest update the href attributes got replaced with '#', now when I click on a date my page gets reloaded because of Turbolinks. Can this be reverted or maybe changed to a <button> instead of <a>?

chrisdavies commented 6 years ago

Ah. Good ol turbolinks. I'm preventing default on the click event, but it's delegated to the root. Still, I'm surprised that Turbolinks doesn't respect that.

Your suggested change got cut off by GitHub. Could you resend them, wrapped in backticks?

I could convert the a elements to button instead or to an Aria span or something.

meneerprins commented 6 years ago

Ye 'good ol turbolinks' always causing problems, I edited my post.

chrisdavies commented 6 years ago

Ok. I'm in meetings all day, but should be able to get to this tonight. Sorry for the breaking change!

meneerprins commented 6 years ago

No worries, not using it in production yet 😃. Thanks for the quick response!

chrisdavies commented 6 years ago

I moved from a to button as you suggested. It's what it should have been all along, logically.

I bumped up to version 2.3, since this might break existing expectations. Anyone moving to 2.3 needs to make sure to update to the latest CSS as well.