vaadin / vaadin-date-picker

The Web Component providing a date selection field with scrollable month calendar. Part of the Vaadin components.
https://vaadin.com/components
Apache License 2.0
165 stars 78 forks source link

Applying invalid field for vaadin-date doesnot apply. #215

Closed abhibly closed 8 years ago

abhibly commented 8 years ago

Hello guys...In one my angular2 forms i have a datepicker which is a required field...When user proceeds to save the form without selecting date i am planning to show the date field as invalid and applied this condition for my datepicker-<vaadin-date-picker [invalid]="!StartDate.valid && isSubmitted" [ngFormControl]="StartDate"></vaadin-date-picker> But this doesn't show the field as an invalid control...If i simply keep the <vaadin-date-picker [invalid]="isSubmitted"></vaadin-date-picker> the invalid property applies to the control... Here isSubmitted is a boolean value set to true

abhibly commented 8 years ago

Added this statement to my directives list PolymerElement('vaadin-date-picker').filter(function(v, i) { return i !== 3; }) Suggested by @platosha