@@ -112,8 +112,7 @@ export class MdDatepickerInput<D> implements AfterContentInit, ControlValueAcces
112
112
/** The value of the input. */
113
113
@Input ( )
114
114
get value ( ) : D | null {
115
- return this . _getValidDateOrNull ( this . _dateAdapter . parse (
116
- this . _elementRef . nativeElement . value , this . _dateFormats . parse . dateInput ) ) ;
115
+ return this . _value ;
117
116
}
118
117
set value ( value : D | null ) {
119
118
if ( value != null && ! this . _dateAdapter . isDateInstance ( value ) ) {
@@ -123,12 +122,14 @@ export class MdDatepickerInput<D> implements AfterContentInit, ControlValueAcces
123
122
value = this . _getValidDateOrNull ( value ) ;
124
123
125
124
let oldDate = this . value ;
125
+ this . _value = value ;
126
126
this . _renderer . setProperty ( this . _elementRef . nativeElement , 'value' ,
127
127
value ? this . _dateAdapter . format ( value , this . _dateFormats . display . dateInput ) : '' ) ;
128
128
if ( ! this . _dateAdapter . sameDate ( oldDate , value ) ) {
129
129
this . _valueChange . emit ( value ) ;
130
130
}
131
131
}
132
+ private _value : D | null ;
132
133
133
134
/** The minimum valid date. */
134
135
@Input ( )
@@ -226,6 +227,7 @@ export class MdDatepickerInput<D> implements AfterContentInit, ControlValueAcces
226
227
this . _datepickerSubscription =
227
228
this . _datepicker . selectedChanged . subscribe ( ( selected : D ) => {
228
229
this . value = selected ;
230
+ // console.log('here ' + this.value);
229
231
this . _cvaOnChange ( selected ) ;
230
232
this . _onTouched ( ) ;
231
233
this . dateInput . emit ( new MdDatepickerInputEvent ( this , this . _elementRef . nativeElement ) ) ;
0 commit comments