title: Thymeleaf Spring boot - input Localdate
body: <p>I'm writing a program in Spring boot and my database is postgre. i have a problem with thymeleaf. I try to input a localdate value but the value remain null. i dont have any problem with another values like String and int.</p>
  
  <p>This is my Localdate value:</p>
  
  <pre><code>@DateTimeFormat(pattern="yyyy-MM-dd")
  private LocalDate einkaufsdatum;
  </code></pre>
  
  <p>and this is my thymeleafs code:</p>
  
  <pre><code>&lt;form action="#" th:action="@{/addmaterial}" th:object="${material}" method="post"&gt;
      &lt;p&gt;Einkaufsdatum: &lt;input type="date" th:value="*{einkaufsdatum}"  /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>and this is my controller:</p>
  
  <pre><code>@RequestMapping(value="addmaterial", method=RequestMethod.POST)
  public String addSpeichern(@ModelAttribute Material material) {
  
  //      System.out.println(material.getEinkaufsdatum()); for testing: print null value!
          materialRepository.save(material);
          return "materialverwaltung"; 
  }
  </code></pre>