2

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?

Limon Monte
  • 52,539
  • 45
  • 182
  • 213
Rover
  • 387
  • 4
  • 14

3 Answers3

3

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 vaadin-date-picker@1.2.0-beta1
tony19
  • 125,647
  • 18
  • 229
  • 307
2

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

Tomek Miszczyk
  • 761
  • 6
  • 6
  • Yeah, the support is coming in 1.2 (out very soon). Sorry for having the documentation already deployed on vaadin.com/docs, that probably causes confusion. – Jouni Nov 29 '16 at 14:09
  • 1.2 is released now: https://github.com/vaadin/vaadin-date-picker/releases/tag/v1.2.0 – Limon Monte Dec 01 '16 at 11:11
2

1.2.0-rc1 was also released today. You can install it with bower:

bower install vaadin-date-picker#1.2.0-rc1

samiheikki
  • 99
  • 8