Skip to content

Commit ce1472e

Browse files
committed
fix(datepicker): make sure _datepickerInput exists before accessing its
disabled property.
1 parent 9545427 commit ce1472e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/lib/datepicker/datepicker.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,8 @@ export class MdDatepicker<D> implements OnDestroy {
148148
/** Whether the datepicker pop-up should be disabled. */
149149
@Input()
150150
get disabled() {
151-
return this._disabled === undefined ? this._datepickerInput.disabled : this._disabled;
151+
return this._disabled === undefined && this._datepickerInput ?
152+
this._datepickerInput.disabled : this._disabled;
152153
}
153154
set disabled(value: any) {
154155
const newValue = coerceBooleanProperty(value);

0 commit comments

Comments
 (0)