title: Trouble with JQuery DatePicker in .NetCore 2.0 MVC
body: <p>I seem to be struggling to get the Jquery datepicker working in my basic CRUD application. I have used NuGet Package Manger to install Jquery UI.Combined library:</p>
  
  <p><a href="https://ibb.co/mmEfic" rel="nofollow noreferrer">https://ibb.co/mmEfic</a></p>
  
  <p>In my _Layout.cshtml file I have the following script tags:</p>
  
  <pre><code>    &lt;script src="https://code.jquery.com/jquery-3.3.1.js"&gt;&lt;/script&gt;
      &lt;script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"&gt;&lt;/script&gt;
      &lt;script&gt;
          $(function () {
              $("#datepicker").datepicker();
          });
      &lt;/script&gt;
  </code></pre>
  
  <p>(The _Layout.cshtml is referenced in my ViewStart file)</p>
  
  <p>Finally, I am trying to use the Datepicker in my View:</p>
  
  <pre><code>@model GymTracker.ViewModel.MemberViewModel
  
  @{
      ViewData["Title"] = "Create";
  }
  
  &lt;link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css"&gt;
  
  
  
  &lt;h2&gt;Create&lt;/h2&gt;
  
  &lt;h4&gt;Member&lt;/h4&gt;
  &lt;hr /&gt;
  &lt;div class="row"&gt;
      &lt;div class="col-md-4"&gt;
          &lt;form asp-action="Create"&gt;
              &lt;div asp-validation-summary="ModelOnly" class="text-danger"&gt;&lt;/div&gt;
              &lt;div class="form-group"&gt;
                  &lt;label asp-for="FirstName" class="control-label"&gt;&lt;/label&gt;
                  &lt;input asp-for="FirstName" class="form-control" /&gt;
                  &lt;span asp-validation-for="FirstName" class="text-danger"&gt;&lt;/span&gt;
              &lt;/div&gt;
              &lt;div class="form-group"&gt;
                  &lt;label asp-for="LastName" class="control-label"&gt;&lt;/label&gt;
                  &lt;input asp-for="LastName" class="form-control" /&gt;
                  &lt;span asp-validation-for="LastName" class="text-danger"&gt;&lt;/span&gt;
              &lt;/div&gt;
              &lt;div class="form-group"&gt;
                  &lt;label asp-for="DateOfBirth" class="control-label"&gt;&lt;/label&gt;
  
             @Html.TextBox("datetimepicker")
  
  
              &lt;/div&gt;
              &lt;div class="form-group"&gt;
                  &lt;label asp-for="PaymentType" class="control-label"&gt;&lt;/label&gt;
                  @Html.DropDownListFor(model =&gt; model.PaymentType, Html.GetEnumSelectList(typeof(Membershiptype)))
  
                  &lt;span asp-validation-for="PaymentType" class="text-danger"&gt;&lt;/span&gt;
              &lt;/div&gt;
              &lt;div class="form-group"&gt;
                  &lt;input type="submit" value="Create" class="btn btn-default" /&gt;
              &lt;/div&gt;
          &lt;/form&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  
  &lt;div&gt;
      &lt;a asp-action="Index"&gt;Back to List&lt;/a&gt;
  &lt;/div&gt;
  
  
  
  
  @section Scripts {
      @{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
  }
  </code></pre>
  
  <p>Can anyone see what I am doing wrong. Surely the line :</p>
  
  <p>@Html.TextBox("datetimepicker")</p>
  
  <p>Would render the Jquery date picker?</p>
  
  <p>Any help would be appreciated. Thank you</p>