0
我想出來的物質2日期選擇以下this example 但我不斷收到此錯誤錯誤:試圖打開一個MdDatepicker沒有關聯的輸入
Error: Attempted to open an MdDatepicker with no associated input.
at MdDatepicker.open (material.es5.js:21344)
下面
是我實現
<md-input-container>
<input mdInput
name="dobdate"
(selectedChanged)="onSelectDOBDate($event)"
[(ngModel)]="admissionModel.DOB"
[mdDatepicker]="picker"
placeholder="Choose a Date of Birth">
<button mdSuffix [mdDatepickerToggle]="dobpicker"></button>
</md-input-container>
<md-datepicker #dobpicker></md-datepicker>
哦!親!!!沒有看到。非常感謝 –
如果它解決了您的問題,請將其標記爲「已接受」:) – Nehal