This is a common pattern where you need to initialize some third part component on top of your rendered html. What you basically need to do is first render your HTML and then call your third party component on the appropriate element. Keep in mind that if you haven't yet attached your view's element to the DOM (as is often the case when you are rendering a view) you can still traverse it's el
using $el.find
.
For example
render: function () {
var template = _.template($('#mytemplate').html());
this.$el.html(template);
this.$el.find('#datetimepicker1').datetimepicker();
return this;
}
And a link to a sjbin