Reputation: 407
I got two Vaadin-datepickers in a Polymer Project. One with a start-date and one with an end-date. I want to make sure that the end-date is always after the start-date. I read the API-Documentation where they say you can use the min max properties.
<vaadin-date-picker label="Start date" value="{{item.startDate}}"></vaadin-date-picker>
<vaadin-date-picker label="End date" min="{{item.startDate}}" value="{{item.endDate}}"></vaadin-date-picker>
With the above example nothing seems to happen?
I did another test to check if the vars are defined and if maybe the format was incorrect
<vaadin-date-picker label="End date" min="2000-01-01" max="2000-12-31" value="{{item.endDate}}"></vaadin-date-picker>
I also checked which version I'm using but that's all up-to-date
1.1.4
Does anybody know what I'm doing wrong?
Upvotes: 2
Views: 684
Reputation: 99
1.2.0-rc1 was also released today. You can install it with bower:
bower install vaadin-date-picker#1.2.0-rc1
Upvotes: 2
Reputation: 138226
As @Tomek pointed out, min
and max
were added in 1.2.0-alpha1
(not yet released). Your code looks correct and would work if using the newer version.
When running bower install vaadin-date-picker
, Bower installs the latest official release, which is currently 1.1.4
. You could install 1.2.0-beta1
with this:
bower install --save [email protected]
Upvotes: 3
Reputation: 761
Min/Max limits are not supported in 1.1.4 release.
From GitHub documentation :
https://github.com/vaadin/vaadin-date-picker/releases/tag/v1.2.0-alpha1
Upvotes: 2