aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorelmot <elmotelmot.vaadin.com>2017-07-28 18:54:57 +0300
committerelmot <elmotelmot.vaadin.com>2017-07-28 18:54:57 +0300
commit63b5f11988e249270e9bec8477f5fe88403a4c7f (patch)
treef99ac215a15ab6a6eaf793acda6e2f7c18acce81
parentb86f089151fe193f6bd6894d9d6f4817903e8f0a (diff)
downloadvaadin-framework-63b5f11988e249270e9bec8477f5fe88403a4c7f.tar.gz
vaadin-framework-63b5f11988e249270e9bec8477f5fe88403a4c7f.zip
Fix documentation
-rw-r--r--documentation/components/components-datefield.asciidoc5
1 files changed, 3 insertions, 2 deletions
diff --git a/documentation/components/components-datefield.asciidoc b/documentation/components/components-datefield.asciidoc
index 3cbba0588f..6137bd0c3d 100644
--- a/documentation/components/components-datefield.asciidoc
+++ b/documentation/components/components-datefield.asciidoc
@@ -121,10 +121,11 @@ in the following example.
DateField date = new DateField("My Date") {
@Override
protected Result<LocalDate> handleUnparsableDateString(
- String dateString) {
+ String dateString) {
try {
// try to parse with alternative format
- return Result.ok(LocalDate.of(dateString, myFormat));
+ LocalDate parsedAtServer = LocalDate.parse(dateString, DateTimeFormatter.ISO_DATE);
+ return Result.ok(parsedAtServer);
} catch (DateTimeParseException e) {
return Result.error("Bad date");
}