title: Date from thymeleaf is always sent null
body: <p>this is my html form:</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;form ui-jp="parsley" th:action="@{/users/created}" th:object="${userCreateDto}" method="post"&gt;
      &lt;div class="row m-b"&gt;
          &lt;div class="col-sm-6"&gt;
              &lt;div class="form-group"&gt;
                  &lt;label&gt;User Valid From&lt;/label&gt;
                  &lt;input type='date' class="form-control" th:field="*{validFrom}" required/&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="col-sm-6"&gt;
              &lt;div class="form-group"&gt;
                  &lt;label&gt;User Valid To&lt;/label&gt;
                  &lt;input type='date' class="form-control" th:field="*{validTill}" required/&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>This is controller:</p>
  
  <pre><code>@RequestMapping(value = "/created", method = RequestMethod.POST)
  public String processCreateUsers(@ModelAttribute UserCreateDto userCreateDto, BindingResult error) {
      log.info("Creating users with this input :"+ userCreateDto.toString());
      this.userService.createUser(userCreateDto);
      return "redirect:/users";
  }
  </code></pre>
  
  <p>And this is the DTO</p>
  
  <pre><code>public class UserCreateDto {
  
      private String username;
  
      private String firstName;
  
      private String lastName;
  
      private String password;
  
      @DateTimeFormat(pattern = "yyyy-mm-dd")
      private Date validFrom;
  
      @DateTimeFormat(pattern = "yyyy-mm-dd")
      private Date validTill;
  }
  </code></pre>
  
  <p>Here Date is <code>java.sql.Date</code></p>
  
  <p>Also, when I import through a JSON file, where I have an array of users - I am able to run this successfully. </p>
  
  <p>When I run it through view, I get the values of <code>validFrom</code> and <code>validTill</code> as null.</p>
  
  <p>Also, when I check the form data after clicking submit - All of the required inputs are set properly. Event the Date parameters are set there.</p>
  
  <p>This is when I print BindingResult error:</p>
  
  <pre><code>Failed to convert property value of type 'java.lang.String' to required type 'java.sql.Date' for property 'validFrom'; nested exception is org.springframework.core.convert.ConversionFailedException: Failed to convert from type [java.lang.String] to type [@org.springframework.format.annotation.DateTimeFormat java.sql.Date] for value '2017-12-10'; nested exception is org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type [org.joda.time.DateTime] to type [@org.springframework.format.annotation.DateTimeFormat java.sql.Date]
  </code></pre>
  
  <p>What am I missing here?</p>
  
  <p>Note: java.util.Date works!</p>