Datepicker deivers wrong Values

Hi,

i have a strange Problem. Simple Case:

  • One Site with a Grid of Members and input Fields
  • Binder + Custom Binder for Datepicker
  • Database stores for example Birthday as Date

Wat simply works:

  • Select a Member edit and Save works fine. Lists refresh after and we go again
  • Same for Delete and Create

Wat breaks the thing:

  • Select a Member from the Grid. Change the Value of Birthday and dont save. Change the Value again and App breaks.
  • The Chain is:
    • First Load of page Plus select of a Member Select gets a Value from the DB like this: 2019-08-23
    • After Switch the Value one or twice in the input Form via Datepicker: The Datepicker setGeburtstagFromLocaldateToDate as expected and the datepicker value is something like Fri Aug 09 00:00:00 CET 2019 so the parse to Date Method breaks with the Failure: java.time.format.DateTimeParseException: Text 'Fri Aug 09 00:00:00 CEST 2019' could not be parsed at index 0

Part of Member Class looks like this to stay with the Birthday:

private Date geburtsdatum;

public Date getGeburtsdatum() {
		return geburtsdatum;
	}

public void setGeburtsdatum(Date geburtsdatum) {
	this.geburtsdatum = geburtsdatum;
}

public LocalDate getGeburtstagAlsLocaDate() {
		if(getGeburtsdatum() == null) {
			return null;
		}else {
			return LocalDate.parse(getGeburtsdatum().toString());
		}
	}
	
	public void setGeburtstagFromLocaldateToDate(LocalDate geburtsdatum) {
		if(geburtsdatum == null) {
			this.geburtsdatum = null;
		}else {
			this.geburtsdatum = Date.from(geburtsdatum.atStartOfDay(ZoneId.systemDefault()).toInstant());
		}
	}

Binder for Birthday Datepicker are:

mitarbeiterBinder.forField(geburtsdatum).bind(Mitarbeiter::getGeburtstagAlsLocaDate, Mitarbeiter::setGeburtstagFromLocaldateToDate);