Closed olegantonyan closed 8 years ago
Hi! If after_render is bad, how can I use libraries such as datetime pickers (http://bevacqua.github.io/rome/, https://tarruda.github.io/bootstrap-datetimepicker)? It requires you to call function with an element. This crap works:
after_render
def after_render `elements = document.getElementsByClassName("timepicker"); for(var i = 0; i < elements.length; i++) { rome(elements[i], { date: false, timeInterval: 600 }); }` end
But it's ugly. What is the best practice to deal with external libraries like these?
Just like in react. You can write you own timepicker component, or use crap like this.
Hi! If
after_render
is bad, how can I use libraries such as datetime pickers (http://bevacqua.github.io/rome/, https://tarruda.github.io/bootstrap-datetimepicker)? It requires you to call function with an element. This crap works:But it's ugly. What is the best practice to deal with external libraries like these?