@@ -22,6 +22,7 @@ export class IgxDayItemComponent {
2222 *
2323 */
2424 @Input ( )
25+ @HostBinding ( 'class.igx-calendar__date--selected' )
2526 public get selected ( ) : any {
2627 return this . _selected ;
2728 }
@@ -85,14 +86,17 @@ export class IgxDayItemComponent {
8586 return this . elementRef . nativeElement ;
8687 }
8788
89+ @HostBinding ( 'class.igx-calendar__date--inactive' )
8890 public get isInactive ( ) : boolean {
8991 return this . date . isNextMonth || this . date . isPrevMonth ;
9092 }
9193
94+ @HostBinding ( 'class.igx-calendar__date--hidden' )
9295 public get isHidden ( ) : boolean {
9396 return this . hideOutsideDays && this . isInactive ;
9497 }
9598
99+ @HostBinding ( 'class.igx-calendar__date--current' )
96100 public get isToday ( ) : boolean {
97101 const today = new Date ( Date . now ( ) ) ;
98102 const date = this . date . date ;
@@ -102,6 +106,7 @@ export class IgxDayItemComponent {
102106 ) ;
103107 }
104108
109+ @HostBinding ( 'class.igx-calendar__date--weekend' )
105110 public get isWeekend ( ) : boolean {
106111 const day = this . date . date . getDay ( ) ;
107112 return day === 0 || day === 6 ;
@@ -123,6 +128,7 @@ export class IgxDayItemComponent {
123128 return isDateInRanges ( this . date . date , this . outOfRangeDates ) ;
124129 }
125130
131+ @HostBinding ( 'class.igx-calendar__date--special' )
126132 public get isSpecial ( ) : boolean {
127133 if ( this . specialDates === null ) {
128134 return false ;
@@ -139,53 +145,16 @@ export class IgxDayItemComponent {
139145 return this . date . isCurrentMonth && ! ( this . isWeekend && this . selected ) ;
140146 }
141147
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-
172148 @HostBinding ( 'class.igx-calendar__date--disabled' )
173149 public get isDisabledCSS ( ) : boolean {
174150 return this . isHidden || this . isDisabled || this . isOutOfRange ;
175151 }
176152
177-
178- @HostBinding ( 'class.igx-calendar__date--special' )
179- public get isSpecialCSS ( ) : boolean {
180- return this . isSpecial ;
181- }
182-
183153 @HostBinding ( 'class.igx-calendar__date--single' )
184154 public get isSingleSelection ( ) : boolean {
185155 return this . selection !== CalendarSelection . RANGE ;
186156 }
187157
188-
189158 private _selected = false ;
190159
191160 constructor ( private elementRef : ElementRef ) { }
0 commit comments