@@ -16,7 +16,6 @@ import {
16
16
ViewContainerRef
17
17
} from '@angular/core' ;
18
18
import { NgControl } from '@angular/forms' ;
19
- import { Moment } from 'moment' ;
20
19
import { CalendarValue } from '../common/types/calendar-value' ;
21
20
import { SingleCalendarValue } from '../common/types/single-calendar-value' ;
22
21
@@ -43,6 +42,7 @@ export class DatePickerDirective implements OnInit {
43
42
@Input ( 'dpDayPicker' ) set config ( config : IDatePickerDirectiveConfig ) {
44
43
this . _config = this . service . getConfig ( config , this . viewContainerRef . element , this . attachTo ) ;
45
44
this . updateDatepickerConfig ( ) ;
45
+ this . markForCheck ( ) ;
46
46
}
47
47
48
48
get attachTo ( ) : ElementRef | string {
@@ -53,6 +53,7 @@ export class DatePickerDirective implements OnInit {
53
53
this . _attachTo = attachTo ;
54
54
this . _config = this . service . getConfig ( this . config , this . viewContainerRef . element , this . attachTo ) ;
55
55
this . updateDatepickerConfig ( ) ;
56
+ this . markForCheck ( ) ;
56
57
}
57
58
58
59
get theme ( ) : string {
@@ -64,6 +65,8 @@ export class DatePickerDirective implements OnInit {
64
65
if ( this . datePicker ) {
65
66
this . datePicker . theme = theme ;
66
67
}
68
+
69
+ this . markForCheck ( ) ;
67
70
}
68
71
69
72
get mode ( ) : CalendarMode {
@@ -75,6 +78,8 @@ export class DatePickerDirective implements OnInit {
75
78
if ( this . datePicker ) {
76
79
this . datePicker . mode = mode ;
77
80
}
81
+
82
+ this . markForCheck ( ) ;
78
83
}
79
84
80
85
@Input ( ) set minDate ( minDate : SingleCalendarValue ) {
@@ -83,6 +88,8 @@ export class DatePickerDirective implements OnInit {
83
88
this . datePicker . minDate = minDate ;
84
89
this . datePicker . ngOnInit ( ) ;
85
90
}
91
+
92
+ this . markForCheck ( ) ;
86
93
}
87
94
88
95
get minDate ( ) : SingleCalendarValue {
@@ -95,6 +102,8 @@ export class DatePickerDirective implements OnInit {
95
102
this . datePicker . maxDate = maxDate ;
96
103
this . datePicker . ngOnInit ( ) ;
97
104
}
105
+
106
+ this . markForCheck ( ) ;
98
107
}
99
108
100
109
get maxDate ( ) : SingleCalendarValue {
@@ -107,6 +116,8 @@ export class DatePickerDirective implements OnInit {
107
116
this . datePicker . minTime = minTime ;
108
117
this . datePicker . ngOnInit ( ) ;
109
118
}
119
+
120
+ this . markForCheck ( ) ;
110
121
}
111
122
112
123
get minTime ( ) : SingleCalendarValue {
@@ -119,6 +130,8 @@ export class DatePickerDirective implements OnInit {
119
130
this . datePicker . maxTime = maxTime ;
120
131
this . datePicker . ngOnInit ( ) ;
121
132
}
133
+
134
+ this . markForCheck ( ) ;
122
135
}
123
136
124
137
get maxTime ( ) : SingleCalendarValue {
@@ -132,6 +145,8 @@ export class DatePickerDirective implements OnInit {
132
145
@Input ( ) set displayDate ( displayDate : SingleCalendarValue ) {
133
146
this . _displayDate = displayDate ;
134
147
this . updateDatepickerConfig ( ) ;
148
+
149
+ this . markForCheck ( ) ;
135
150
}
136
151
137
152
@Output ( ) open = new EventEmitter < void > ( ) ;
@@ -241,4 +256,10 @@ export class DatePickerDirective implements OnInit {
241
256
}
242
257
}
243
258
}
259
+
260
+ markForCheck ( ) {
261
+ if ( this . datePicker ) {
262
+ this . datePicker . cd . markForCheck ( ) ;
263
+ }
264
+ }
244
265
}
0 commit comments