title: Using jquery datepicker in MVC 4
body: <p>I am trying to use jQuery's datepicker without much success. Here is the related code:
  The problem is that I am not getting jQuery's datepicker to show. The page renders an input tag with type text. It has the correct value displayed. However, when I click in it, the Date Time picker is not displayed.
  Model:</p>
  
  <pre><code>    public class Book
  {
      public int Id { get; set; }
  
      public string Title { get; set; }
  
      public string Author { get; set; }
  
      public string MediaPath { get; set; }
  
      public int Rating { get; set; }
  
      [DataType(DataType.Date)]
      public DateTime PublicationDate { get; set; }
  
  }
  </code></pre>
  
  <p>View snippet:</p>
  
  <pre><code>&lt;link rel="stylesheet" href="http://code.jquery.com/ui/1.8.20/themes/base/jquery-ui.css" type="text/css" media="all" /&gt;
  &lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="http://code.jquery.com/ui/1.8.20/jquery-ui.min.js" type="text/javascript"&gt;&lt;/script&gt;
  
  &lt;script type="text/javascript"&gt;
      $(document).ready(function () {
          $('.date').datepicker();         
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>....</p>
  
  <pre><code>@Html.TextBox("PublicationDate", Model.PublicationDate.ToString("yyyy"), new { @class = "date" })
  </code></pre>