I am using ng2-datepicker for available date and date expires. I was wondering if anyone knew how to set an initial value. Everything with the date picker works, I just want dateAvaliable to be today's date and then dateExpires to be 2099-12-31. <label>Date Avaliable:</label> <div> <ng2-datepicker name="dateAvaliable" [(ngModel)]="dateAvaliable" [ngModelOPtions]="{standalone: true}"> </ng2-datepicker> </div> <label>Date Expires:</label> <div> <ng2-datepicker name="dateExpires" [(ngModel)]="dateExpires" [ngModelOPtions]="{standalone: true}"> </ng2-datepicker> </div> Component: private today = new Date(); private dd: any = this.today.getDate(); private mm: any = this.today.getMonth() +1; private year: any = this.today.getFullYear(); public sop: Sop; public dateExpires: any; public dateAvaliable: any; ngOnInit() { if (this.dd<10) { this.dd ='0'+this.dd; } if(this.mm<10){ this.mm='0'+this.mm; } this.sop = { description: "", country: [this.countrys[4].value], storeType: [this.storeTypes[4].value], scoType: [this.scoTypes[6].value], audience: [this.audiences[2].value], sopType: [this.sopTypes[2].value], dateAvaliable: this.year +'-'+this.mm+'-'+this.dd, dateExpires: "2099-12-31" } } this is my interface: export interface Sop { description: String; country?: String[]; storeType?: String[]; scoType?: String[]; audience?: String[]; sopType?: String[]; dateAvaliable: any; dateExpires: any; } Continue reading...