Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Vaadin 8: Proper way to display localized LocalDate in a grid ?
The following code
DateField birthDateField = new DateField();
birthDateField.setLocale(new Locale("en"));
grid.addColumn(WeighInAthlete::getBirthDate)
.setCaption("Birth Date")
.setEditorBinding(
binder.bind(birthDateField, WeighInAthlete::getBirthDate, WeighInAthlete::setBirthDate));
yields a cell field formatted in ISO-8601 international format (2006-03-17) because the date picker returns a Java8 LocalDate and (oddly enough) the locale set on the field is NOT used for display. However, when editing, the date picker DOES use the specified locale (see the attached .png file), which yields rather odd effects as seen below.
Now for added pleasure, attempting to fix this by addig a DateRenderer to force the local format in the DateField doesn't work, because a LocalDate is not a Date -- the Java no longer compiles.
And since there is no LocalDateRenderer to fix the format, that seems to be a lot of work for something that should just work.
Note: I can force the editing component (DateField) to display 2017-03-14 instead of 3/14/17 by using
birthDateField.setDateFormat("yyyy-MM-dd");
but I want to do the opposite -- change the way the *grid* cell displays the value provided by the field.