bug
when i click the calendar button, pop up the calendar,and select the date
when i click the calendar button, the form ngSubmit function will be exec
just put a Datepicker component in form
<md-dialog-content>
<form (ngSubmit)="onSubmit()" #dialogForm="ngForm">
<md-input-container>
<input mdInput [mdDatepicker]="myDatepicker" name="mydatep">
<button mdSuffix [mdDatepickerToggle]="myDatepicker"></button>
</md-input-container>
<md-datepicker #myDatepicker [touchUi]="true"></md-datepicker>
<md-dialog-actions [attr.align]="actionsAlignment">
<button md-raised-button color="primary" md-dialog-close (click)="dialogClose()"> Close </button>
<button type="submit" md-raised-button color="accent" [disabled]="!dialogForm.form.valid"> OK </button>
</md-dialog-actions>
</form>
</md-dialog-content>
It isn't working properly in form, and it is work properly outside form
Angular 4.2.0-beta.0
material 2.0.0-beta.5
os win10
typescript 2.3.1
Browsers: Chrome 58.0.3029.110 (64-bit)
I Fix that problem using type attribute in button date picker
Most helpful comment
I Fix that problem using type attribute in button date picker