Ted Leason

Joined

60 Experience
0 Lessons Completed
0 Questions Solved

Activity

Thank you very much for such fast and appropriate response.

Hi Chris
Thanks for the Episode.

I'm new for Rails 6, and when I followed your lesson I've got the multi dubbing of the flatpickr on going the back page in a browser. Like this: see screenshot
Then I've added to the application.js file:

document.addEventListener("turbolinks:before-cache", () => {
  $("[data-behavior='flatpickr']").each(function(){ 
    this._flatpickr.destroy()
   })
})

Is it the right way to overcome this?
Or have I done some code mistake that cause my problem?

Best regards,
Ted

logo Created with Sketch.

Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more. Icons by Icons8

© 2023 GoRails, LLC. All rights reserved.