@@ -91,9 +91,8 @@ export class DatePickerInner implements OnInit {
9191  private  onlyCurrentMonth :boolean ; 
9292  @Input ( ) 
9393  private  shortcutPropagation :boolean ; 
94-   // todo: change type during implementation 
9594  @Input ( ) 
96-   private  customClass :any ; 
95+   private  customClass :Array < { date : Date ,   mode : string ,   clazz : string } > ; 
9796  // todo: change type during implementation 
9897  @Input ( ) 
9998  private  dateDisabled :any ; 
@@ -232,15 +231,25 @@ export class DatePickerInner implements OnInit {
232231  private  createDateObject ( date :Date ,  format :string ) :any  { 
233232    let  dateObject :any  =  { } ; 
234233    dateObject . date  =  date ; 
234+     dateObject . date . setHours ( 0 ,  0 ,  0 ,  0 ) ; 
235235    dateObject . label  =  this . dateFilter ( date ,  format ) ; 
236236    dateObject . selected  =  this . compare ( date ,  this . selectedDate )  ===  0 ; 
237237    dateObject . disabled  =  this . isDisabled ( date ) ; 
238238    dateObject . current  =  this . compare ( date ,  new  Date ( ) )  ===  0 ; 
239-     // todo: do it 
240-     // dateObject.customClass = this.customClass({date: date, mode: this.datepickerMode}) || {}; 
239+     dateObject . customClass  =  this . getCustomClassForDate ( dateObject . date ) ; 
241240    return  dateObject ; 
242241  } 
243242
243+   private  getCustomClassForDate ( date :Date )  { 
244+     if  ( ! this . customClass )  { 
245+       return  '' ; 
246+     } 
247+     var  customClassObject :{ date :Date ,  mode :string ,  clazz :string }  =  this . customClass . find ( customClass  =>  { 
248+       return  customClass . date . valueOf ( )  ===  date . valueOf ( )  &&  customClass . mode  ===  this . datepickerMode ; 
249+     } ,  this ) ; 
250+     return  customClassObject  ===  undefined  ? ''  : customClassObject . clazz ; 
251+   } ; 
252+ 
244253  private  isDisabled ( date :Date ) :boolean  { 
245254    // todo: implement dateDisabled attribute 
246255    return  ( ( this . minDate  &&  this . compare ( date ,  this . minDate )  <  0 )  || 
0 commit comments