Skip to content

color theme (blue)

Keke edited this page May 14, 2021 · 20 revisions

Put CSS to the stylesData option like below. It is also possible to create a new color theme based on the template below. Change any style defined here.

Color themes:

Other

Try above color themes here.

<input angular-mydatepicker [(ngModel)]="model" [options]="myDatePickerOptions" 
    #dp="angular-mydatepicker">
import {IAngularMyDpOptions} from 'angular-mydatepicker';

export class MyApp {
    myDatePickerOptions: IAngularMyDpOptions = {
      stylesData: {
        selector: 'dp1',
        styles: `
           .dp1 .myDpIconLeftArrow,
           .dp1 .myDpIconRightArrow,
           .dp1 .myDpHeaderBtn {
               color: #3855c1;
            }
           .dp1 .myDpHeaderBtn:focus,
           .dp1 .myDpMonthLabel:focus,
           .dp1 .myDpYearLabel:focus {
               color: #66afe9;
            }
           .dp1 .myDpDaycell:focus,
           .dp1 .myDpMonthcell:focus,
           .dp1 .myDpYearcell:focus {
               box-shadow: inset 0 0 0 1px #66afe9;
            }
           .dp1 .myDpSelector:focus {
               box-shadow: -1px 1px 6px 0px #ADD8E6;
            }
           .dp1 .myDpSelectorArrow:focus:before {
               border-bottom-color: #ADD8E6;
            }
           .dp1 .myDpCurrMonth,
           .dp1 .myDpMonthcell,
           .dp1 .myDpYearcell {
               color: #3855c1;
               font-weight: bold;
            }
           .dp1 .myDpDaycellWeekNbr {
               color: #3855c1;
            }
           .dp1 .myDpPrevMonth,
           .dp1 .myDpNextMonth {
               color: #6495ED;
            }
           .dp1 .myDpWeekDayTitle {
               background-color: transparent;
               color: #3855c1;
               font-weight: bold;
            }
           .dp1 .myDpHeaderBtnEnabled:hover,
           .dp1 .myDpMonthLabel:hover,
           .dp1 .myDpYearLabel:hover,
           .dp1 .myDpFooterBtn:hover {
               color: #add8e6;
            }
           .dp1 .myDpMarkCurrDay, 
           .dp1 .myDpMarkCurrMonth, 
           .dp1 .myDpMarkCurrYear {
               border-bottom: 2px solid #3855c1;
            }
           .dp1 .myDpDisabled {
               color: #999;
            }
           .dp1 .myDpHighlight {
               color: #cd5c5c;
            }
           .dp1 .myDpTableSingleDay:hover, 
           .dp1 .myDpTableSingleMonth:hover, 
           .dp1 .myDpTableSingleYear:hover {
               background-color: #add8e6;
               color: #3855c1;
            }
           .dp1 .myDpRangeColor {
               background-color: #dbeaff;
            }
           .dp1 .myDpSelectedDay,
           .dp1 .myDpSelectedMonth,
           .dp1 .myDpSelectedYear {
               background-color: #8EBFFF;
            }
         `
      }
        // other options here
    }

    constructor() {}
}