@@ -22,6 +22,7 @@ export class IgxDayItemComponent {
22
22
*
23
23
*/
24
24
@Input ( )
25
+ @HostBinding ( 'class.igx-calendar__date--selected' )
25
26
public get selected ( ) : any {
26
27
return this . _selected ;
27
28
}
@@ -85,14 +86,17 @@ export class IgxDayItemComponent {
85
86
return this . elementRef . nativeElement ;
86
87
}
87
88
89
+ @HostBinding ( 'class.igx-calendar__date--inactive' )
88
90
public get isInactive ( ) : boolean {
89
91
return this . date . isNextMonth || this . date . isPrevMonth ;
90
92
}
91
93
94
+ @HostBinding ( 'class.igx-calendar__date--hidden' )
92
95
public get isHidden ( ) : boolean {
93
96
return this . hideOutsideDays && this . isInactive ;
94
97
}
95
98
99
+ @HostBinding ( 'class.igx-calendar__date--current' )
96
100
public get isToday ( ) : boolean {
97
101
const today = new Date ( Date . now ( ) ) ;
98
102
const date = this . date . date ;
@@ -102,6 +106,7 @@ export class IgxDayItemComponent {
102
106
) ;
103
107
}
104
108
109
+ @HostBinding ( 'class.igx-calendar__date--weekend' )
105
110
public get isWeekend ( ) : boolean {
106
111
const day = this . date . date . getDay ( ) ;
107
112
return day === 0 || day === 6 ;
@@ -123,6 +128,7 @@ export class IgxDayItemComponent {
123
128
return isDateInRanges ( this . date . date , this . outOfRangeDates ) ;
124
129
}
125
130
131
+ @HostBinding ( 'class.igx-calendar__date--special' )
126
132
public get isSpecial ( ) : boolean {
127
133
if ( this . specialDates === null ) {
128
134
return false ;
@@ -139,53 +145,16 @@ export class IgxDayItemComponent {
139
145
return this . date . isCurrentMonth && ! ( this . isWeekend && this . selected ) ;
140
146
}
141
147
142
- @HostBinding ( 'class.igx-calendar__date--inactive' )
143
- public get isInactiveCSS ( ) : boolean {
144
- return this . isInactive ;
145
- }
146
-
147
- @HostBinding ( 'class.igx-calendar__date--hidden' )
148
- get isHiddenCSS ( ) : boolean {
149
- return this . isHidden ;
150
- }
151
-
152
- @HostBinding ( 'class.igx-calendar__date--current' )
153
- public get isTodayCSS ( ) : boolean {
154
- return this . isToday ;
155
- }
156
-
157
- @HostBinding ( 'class.igx-calendar__date--selected' )
158
- public get isSelectedCSS ( ) : boolean {
159
- return this . isCurrentMonth && this . selected ;
160
- }
161
-
162
- @HostBinding ( 'class.igx-calendar__date--selected-dimmed' )
163
- public get isSelectedDimmedCSS ( ) : boolean {
164
- return ! this . isCurrentMonth && this . isSingleSelection && this . selected ;
165
- }
166
-
167
- @HostBinding ( 'class.igx-calendar__date--weekend' )
168
- public get isWeekendCSS ( ) : boolean {
169
- return this . isWeekend ;
170
- }
171
-
172
148
@HostBinding ( 'class.igx-calendar__date--disabled' )
173
149
public get isDisabledCSS ( ) : boolean {
174
150
return this . isHidden || this . isDisabled || this . isOutOfRange ;
175
151
}
176
152
177
-
178
- @HostBinding ( 'class.igx-calendar__date--special' )
179
- public get isSpecialCSS ( ) : boolean {
180
- return this . isSpecial ;
181
- }
182
-
183
153
@HostBinding ( 'class.igx-calendar__date--single' )
184
154
public get isSingleSelection ( ) : boolean {
185
155
return this . selection !== CalendarSelection . RANGE ;
186
156
}
187
157
188
-
189
158
private _selected = false ;
190
159
191
160
constructor ( private elementRef : ElementRef ) { }
0 commit comments