Automatically increase second DateField bij 1

Hello there,

Let me start off by telling I’m just barely scratching the surface off Vaadin and Java so bare with me.

I’ve two datefields on a form which are created using the following code:

DateField beginDatum = new DateField("Begindatum");
beginDatum.setDateFormat("dd-MM-yyyy");

DateField eindDatum = new DateField("Einddatum");									
eindDatum.setDateFormat("dd-MM-yyyy");		

The beginDatum is the starting date and the eindDatum is always 1 day later then the begindatum.
Is it possible to automatically adjust the einddatum based on the begin datum?

As I understand thus far I can add an addValueChangeListener like this:

beginDatum.addValueChangeListener(e->datumwijzig(e.getValue()));

And create an function but then things start to fall apart…

public void datumwijzig (LocalDate localDate) {
			einddatum.setValue = (LocalDate +1day)   //<-  I know this is not correct but it is just to illustrate my meaning
		}

Any pointers would be appreciated.

Kind regards,

Maurice