summaryrefslogtreecommitdiffstats
path: root/documentation
diff options
context:
space:
mode:
authorDenis Anisimov <denis@vaadin.com>2016-09-27 10:41:37 +0300
committerDenis Anisimov <denis@vaadin.com>2016-09-30 06:56:18 +0000
commitd36d63fefa3ab9f4908f97772bcc6499e4f52532 (patch)
treed2189db8f44601925a96435dedec031459eeed57 /documentation
parentdb3a91c9b4d8d0451c8f1c5e875f4c6f6f50324a (diff)
downloadvaadin-framework-d36d63fefa3ab9f4908f97772bcc6499e4f52532.tar.gz
vaadin-framework-d36d63fefa3ab9f4908f97772bcc6499e4f52532.zip
Make AbstractDateField based on LocalDate (#125).
Change-Id: I33a4a4f0f3437a8d1733031a131afbe844c12afb
Diffstat (limited to 'documentation')
-rw-r--r--documentation/datamodel/datamodel-fields.asciidoc2
-rw-r--r--documentation/datamodel/datamodel-forms.asciidoc8
2 files changed, 5 insertions, 5 deletions
diff --git a/documentation/datamodel/datamodel-fields.asciidoc b/documentation/datamodel/datamodel-fields.asciidoc
index 651def13a6..ac39c7fda0 100644
--- a/documentation/datamodel/datamodel-fields.asciidoc
+++ b/documentation/datamodel/datamodel-fields.asciidoc
@@ -25,7 +25,7 @@ Button sayHelloButton = new Button("Say hello", clickEvent -> {
});
----
-Each field implementation has its own specific value type – the type of a [classname]#TextField# is [classname]#String#, the type of a [classname]#Slider# is [classname]#Double#, the type of a [classname]#PopupDateField# is [classname]#LocalDate#, and so on.
+Each field implementation has its own specific value type – the type of a [classname]#TextField# is [classname]#String#, the type of a [classname]#Slider# is [classname]#Double#, the type of a [classname]#DateField# is [classname]#LocalDate#, and so on.
== Reacting to Value Changes
diff --git a/documentation/datamodel/datamodel-forms.asciidoc b/documentation/datamodel/datamodel-forms.asciidoc
index 3c2dd95bb5..8772f0d770 100644
--- a/documentation/datamodel/datamodel-forms.asciidoc
+++ b/documentation/datamodel/datamodel-forms.asciidoc
@@ -200,12 +200,12 @@ We can save the binding to a local variable and trigger a revalidation when anot
[source, java]
----
-PopupDateField departing = new PopupDateField("Departing");
-PopupDateField returning = new PopupDateField("Returning");
+DateField departing = new DateField("Departing");
+DateField returning = new DateField("Returning");
// Store return date binding so we can revalidate it later
-Binding<Trip, Date, Date> returnBinding = binder.forField(returning)
- .withValidator(returnDate -> !returnDate.before(departing.getValue()),
+Binding<Trip, LocalDate, LocalDate> returnBinding = binder.forField(returning)
+ .withValidator(returnDate -> !returnDate.isBefore(departing.getValue()),
"Cannot return before departing");
returnBinding.bind(Trip::getReturnDate, Trip::setReturnDate);