From 997aa3811e6e0a72d614840d87a9e1f9747913f1 Mon Sep 17 00:00:00 2001 From: Johan Smolders Date: Tue, 26 Apr 2016 12:18:19 +0200 Subject: [PATCH] Active date should return now if nothing is set. Active date is used to select a date in pop-up. It doesn't reflect selected-date. --- components/datepicker/datepicker-inner.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/datepicker/datepicker-inner.ts b/components/datepicker/datepicker-inner.ts index f5808cf20c..246fe14b23 100644 --- a/components/datepicker/datepicker-inner.ts +++ b/components/datepicker/datepicker-inner.ts @@ -127,7 +127,7 @@ export class DatePickerInner implements OnInit { if (this.initDate) { this.activeDate = this.initDate; this.selectedDate = new Date(this.activeDate.valueOf()); - this.update.emit(this.activeDate); //Only emit if selectedDate changed, otherwise datepicker already has correct value. + this.update.emit(this.activeDate); // Only emit if selectedDate changed, otherwise datepicker already has correct value. } else if (this.activeDate === undefined) { this.activeDate = new Date(); } @@ -150,7 +150,7 @@ export class DatePickerInner implements OnInit { } public compare(date1:Date, date2:Date):number { - if(date1=== undefined || date2 === undefined){ + if(date1 === undefined || date2 === undefined) { return undefined; }