title: LocalDate in form
body: <p>I have a question about Spring + Thymeleaf date format.
  I have a simple entity with <code>LocalDate date</code> field. I want to get this date from a user in form and save it to MySQL database.
  I'm getting such an error:</p>
  
  <blockquote>
    <p>Failed to convert property value of type java.lang.String to required type java.time.LocalDate for property date; nested exception is org.springframework.core.convert.ConversionFailedException: Failed to convert from type java.lang.String to type java.time.LocalDate for value 2019-04-30; nested exception is java.time.format.DateTimeParseException: Text 2019-04-30 could not be parsed at index 2</p>
  </blockquote>
  
  <p>My entity:</p>
  
  <pre><code>@Entity
  @Table(name="game")
  public class Game{
  
      @Id
      @GeneratedValue(strategy = GenerationType.AUTO)
      private long id;
      @Transient
      private User gameOwner;
      private LocalDate date;
      private LocalTime time;
  
      //other fields
  </code></pre>
  
  <p>Thymeleaf view / form:</p>
  
  <pre><code>&lt;form action="#" th:action="@{/games/addForm}" th:object="${gameForm}" method="post"&gt;    
      &lt;p&gt;Date: &lt;input type="date" th:field="*{date}" /&gt;&lt;/p&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>What's the reason for this problem? Maybe there is the other, better way to storage date?</p>