Perhaps this approach was not available when this question was originally submitted, but I initialize the datupixer when its template is rendered.
Template.templateName.rendered = function() { $('#datepicker').datepicker(); }
Here is a link to the event: http://docs.meteor.com/#template_rendered
With this approach, I do not support the session property or handle focus events. Prashant's solution did not work for me when the template was unloaded and returned because the session property worked. I also had a problem where the datapicker did not appear on the first focus.
Yes, the datapicker will be initialized each time the template is rendered, but I think that everything is in order, since I am sure that the template resources are cleared when navigating between them.
source share