title: jQuery DatePicker MVC4 EditorFor
body: <p>I need to use datepicker on an EditorFor field.</p>
  
  <p>My code for the view is:</p>
  
  <pre><code>&lt;div class="editor-label"&gt;
      @Html.Label("birthDate","birthDate")
  &lt;/div&gt;
  &lt;div class="editor-field"&gt;
      @Html.EditorFor(model =&gt; model.birthDate, new { @class = "datepicker"})
      @Html.ValidationMessageFor(model =&gt; model.birthDate)
  &lt;/div&gt;
  </code></pre>
  
  <p>The script:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  $(document).ready(
      function () {
          $('.datepicker').datepicker({
              changeMonth: true,
              changeYear: true,
              minDate: "-99Y",
              dateFormat: "dd/mm/yyyy"
          });
      });
  </code></pre>
  
  <p></p>
  
  <p>I can't make it work. I have the following error: Microsoft JScript runtime error: Object doesn't support this property or method 'datepicker'.</p>
  
  <p>I have already loaded jQuery before I try to call the function.</p>