I've created a vaadin grid and used the setItems method in combination with a custom jpa repository that returns a paged stream. The problem appears when the grid has to show a date with a specific date (2019-12-31), it will automatically show "31.12.2020", looks like the date is somehow jumping to the next year.
here the grid
private Grid<Budget> createGrid() {
Grid<Budget> grid = new Grid<>(Budget.class, false);
grid.setPageSize(100);
grid.setSortableColumns();
grid.addColumn(new LocalDateRenderer<>(Budget::getValidfrom, "dd.MM.YYYY")).setHeader("Gültig von");
grid.addColumn(new LocalDateRenderer<>(Budget::getValidto, "dd.MM.YYYY")).setHeader("Gültig bis");
for (Grid.Column<Budget> c : grid.getColumns()) {
c.setAutoWidth(true).setFlexGrow(2);
}
return grid;
}
here how I fill the grid
grid.setItems(query -> service.getLimitData(filter, query.getPage(), query.getPageSize()).stream());