title: Rails 4 Jquery datepicker doesn't show up
body: <p>my jquery ui datepicker works fine when I directly open the link (<a href="http://localhost:3000/expenses/dateForm" rel="nofollow">http://localhost:3000/expenses/dateForm</a>) after running the rails application. But when I give the link for the view ('/expenses/dateForm') on my home page 'Reports button' and open the link on clicking Reports button on home page, datepicker doesnt show up. </p>
  
  <p>Below is the view 'dateForm' :</p>
  
  <pre><code>&lt;%= form_tag({:controller =&gt; 'expenses', :action =&gt; 'dateFilter'}, :class =&gt;"datepicker") do %&gt;
  &lt;%= collection_select Category, :id, Category.all, :id, :name, :include_blank =&gt; "Please select category..." %&gt;
  &lt;%= label_tag("Start Date") %&gt; &lt;br /&gt;
  &lt;%= text_field_tag(:start_date) %&gt;
  &lt;%= label_tag("End Date") %&gt; &lt;br /&gt;
  &lt;%= text_field_tag(:end_date) %&gt;
  &lt;%= submit_tag "Submit" %&gt;
  &lt;% end %&gt; 
  </code></pre>
  
  <p>Here is home.html.erb :</p>
  
  <pre><code>&lt;section class="form-button-item"&gt; 
    &lt;%= link_to "Reports", '/expenses/dateForm', class: "btn btn-lg btn-block btn-primary"%&gt;
  &lt;/section&gt;
  </code></pre>
  
  <p>Below is my application.js :</p>
  
  <pre><code>$(document).ready(function() {
  
  $("#start_date").datepicker({dateFormat: "yy-mm-dd"});
  $("#end_date").datepicker({dateFormat: "yy-mm-dd"});
  
  });
  </code></pre>
  
  <p>Please suggest the fix for this issue.</p>