title: spring mvc date format with form:input
body: <p>I have hibernate entity and a bean:</p>
  
  <pre><code>@Entity
  public class GeneralObservation {
      @DateTimeFormat(pattern = "dd/MM/yyyy")
      Date date;
  
      @Column
      public Date getDate() {
          return date;
      }
  
      public void setDate(Date date) {
          this.date = date;
      }
  }
  </code></pre>
  
  <p>also I have </p>
  
  <pre><code>@InitBinder
  protected void initBinder(WebDataBinder binder) {
      SimpleDateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy");
      binder.registerCustomEditor(Date.class, new CustomDateEditor(
              dateFormat, false));
  }
  </code></pre>
  
  <p>and </p>
  
  <pre><code>        form:input
                  id = "datepicker"
                  name="date"
                  itemLabel="date"
                  path="newObservation.date"
  </code></pre>
  
  <p>When I go to my url I see:</p>
  
  <p><img src="https://i.stack.imgur.com/0NdXl.png" alt="my form"></p>
  
  <p>How can I force it to have mm/DD/yyyy format? Thanx</p>