title: Jquery UI Datepicker refresh issue
body: <p>I have used jquery ui datepicker in my application. It is working fine for the first time, but failing to refresh the page after navigating to another page.Datepicker not working when i come to the datepicker page.</p>
  
  <pre><code>@model FloorPlanner.Models.AuditViewModel
  &lt;script src="~/Scripts/jquery.ui.datepicker.js"&gt;&lt;/script&gt;
  &lt;script&gt;
  
      var startdate;
      var enddate;
      $(document).ready(function () {
          $(function () {
              $("#datepicker").datepicker(
        {
            dateFormat: 'yy, mm , dd',
            onSelect: function () {
                startdate = $(this).datepicker('getDate');
                startdate = (startdate.getFullYear()) + '/' + (startdate.getMonth() + 1) + '/' + (startdate.getDate());
     }
        })
          });
          $(function () {
              $("#datepicker2").datepicker(
            {
                dateFormat: 'yy, mm , dd',
                onSelect: function () {
                    enddate = $(this).datepicker('getDate');
                    enddate = (enddate.getFullYear()) + '/' + (enddate.getMonth() + 1) + '/' + (enddate.getDate() + 1);
                }
            })
  
          });
          $("#auditfilter").click(function () {
              $.ajax({
                  type: 'POST',
                  url: 'Floor/AuditFilter',
                  data: {
                      startDate: startdate,
                      endDate: enddate
                  },
                  success: function (data) {
                      $('#divTOPutPartialViewIn').html(data);
                  },
                  error: function (data)
                  {
                      alert("select date");
                  },
                  complete: function () { }
              });
          });
      });
  
  &lt;/script&gt;
  &lt;div class="panel panel-default"&gt;
      &lt;div class="panel-heading"&gt;
          &lt;div class="row"&gt;
              &lt;div class="btn-toolbar" role="toolbar"&gt;
                  &lt;div class="btn-group btn-group-sm fp-btn-group-float-right"&gt;
                      &lt;button class="btn btn-default" type="button" id="showTree"&gt;
                          &lt;span class="glyphicon glyphicon-sort-by-attributes"&gt;&lt;/span&gt;
                      &lt;/button&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="panel-body fp-container-panel-body"&gt;
          &lt;table class="input-group" style="padding-left: 5px;" border="0"&gt;
              &lt;tr&gt;&lt;td &gt;Start Date
                  &lt;input type="text" id="datepicker"style="Height: 30px"/&gt;&lt;/td&gt;
                  &lt;td style="padding-left: 10px"&gt;End Date &lt;input type="text" id="datepicker2"style="Height: 30px" /&gt;&lt;/td&gt;
                  &lt;td style="Height: 16px "&gt;&lt;input id="auditfilter" type="button" value="Audit Trail" class="btn btn-primary" /&gt;&lt;/td&gt;
              &lt;/tr&gt;
          &lt;/table&gt;
  
  
          &lt;div id="divTOPutPartialViewIn"&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  @*@Scripts.Render("~/bundles/jqueryui") *@
  </code></pre>
  
  <p>I have tried destroying the datepicker in document ready function also tried refresh in the same, nothing working, it is working only if i do the entire application refresh by pressing F5.</p>
  
  <p>I have included the js,css files in bundle config.</p>
  
  <p>Thanks</p>