Last active
January 8, 2018 14:57
-
-
Save jonathanroehm/d66a733dd8ec95180b5d2cf48d9b6887 to your computer and use it in GitHub Desktop.
How to initialize flatpickr.js plugin in Rails with turbo links and JQuery 3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# assets/javascripts/vendors/flatpickr.coffee | |
# Flatpickr is set with a f.input :obj, data: { toggle: 'flatpickr' } | |
start = -> | |
$("[data-toggle='flatpickr']").flatpickr | |
altInput: true | |
document.addEventListener('turbolinks:load', start) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment