title: Bootstrap datetimepicker appears at the top-left corner of the window
body: <p>I am using the date time picker from God knows where but it just happens to be there in a set of files with the naming convention <code>bootstrap-datetimepicker-min.js</code> and <code>.css</code>. I assume this is one of the bootstrap widgets, then, which I should think is based on jQuery UI's date time picker. Anyway, the API is pretty similar to the jQuery UI date time picker.</p>
  
  <p>So, I have this code but the date time picker shows up on the top-left corner of the window once I click on the date input field, and then it does not go away either.</p>
  
  <p><strong>ThePage.cshtml</strong></p>
  
  <pre><code>...
  
  &lt;!-- stuff --&gt;
  
  &lt;div class="form-group"&gt;
              @Html.LabelFor(model =&gt; model.FromDate, htmlAttributes: new { @class = "control-label col-md-2"})
              &lt;div class="col-md-10"&gt;
                  &lt;input type="text"class="form-control" id="dtFromDate" name="FromDate" /&gt;
                  @Html.ValidationMessageFor(model =&gt; model.FromDate, "", new { @class = "text-danger" })
              &lt;/div&gt;
          &lt;/div&gt;
  
  @section scripts {
      &lt;script type="text/javascript"&gt;
          $(document).ready(Initialize);
  
          function Initialize()
          {
              $('#dtFromDate').datetimepicker();
              $('#dtToDate').datetimepicker();
          }
      &lt;/script&gt;
  }
  </code></pre>
  
  <p>And the layout page has the include statements to include the right JavaScript and CSS files:</p>
  
  <p><strong>Layout.cshtml</strong></p>
  
  <pre><code>&lt;!-- on the top of the page somewhere --&gt;
  @Styles.Render("~/Content/css")
  
  ...
  &lt;!-- stuff --&gt;
  
  &lt;!-- at the bottom of the layout page --&gt;
  @Scripts.Render("~/bundles/bootstrap")
  @Scripts.Render("~/bundles/components")
  @RenderSection("scripts", required: false)
  </code></pre>
  
  <p><strong>BundleConfig.cs</strong></p>
  
  <pre><code>bundles.Add(new StyleBundle("~/Content/css").Include(
                        "~/Content/site.css",
                        "~/Content/Calendar/css/bootstrap-datetimepicker.min.css",
                        "~/Content/select2/css/select2.min.css"
                        ));
  
  bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include(
                        "~/Scripts/bootstrap.js",
                        "~/Scripts/respond.js"
                        ));
  
  bundles.Add(new ScriptBundle("~/bundles/components").Include(
                  "~/Content/Calendar/js/bootstrap-datetimepicker.min.js",
                        "~/Content/select2/js/select2.full.min.js",
                        "~/Content/select2/js/i18n/en.js"
                  ));
  </code></pre>