title: Jquery date picker in Meteor.js
body: <p>I am trying to use jquery datepicker in my project, but I want to show it when the user in editing mode. When I use it without if statement, it works perfect, but when I put in if statement, it does not render. How can I solve this?</p>
  
  <p>This is the part of my template</p>
  
  <pre><code>   {{#if editing_duedate}}
          &lt;input class="datepicker"  name="date"&gt;
      {{else}}
          &lt;div class="row text-center"&gt;
                  &lt;div class="eventduedate"&gt;
                       {{duedate}}
                  &lt;/div&gt;
          &lt;/div&gt;
      {{/if}}
  </code></pre>
  
  <p>This where I render datepicker</p>
  
  <pre><code>Template.assignmenttodositem.rendered = function() {
  $('.datepicker').datepicker();    
   };
  </code></pre>
  
  <p>This is my template events</p>
  
  <pre><code>Template.assignmenttodositem.events({
  
  ......
  'dblclick .eventduedate':function(evt,tmpl){
      evt.preventDefault();
      Session.set('editingduedate', this._id);
  }
  ..........
  </code></pre>
  
  <p>This is where I check if statement</p>
  
  <pre><code>Template.assignmenttodositem.editing_duedate = function () {
      return Session.equals('editingduedate', this._id);
   };
  </code></pre>