From 632125359a291a73f276e7499ac7d3b356698878 Mon Sep 17 00:00:00 2001 From: Johan Smolders Date: Wed, 20 Apr 2016 17:01:59 +0200 Subject: [PATCH] fix(datepicker): If the date was set by ngModel it will be overwritten by default value When ngModel was set only the activeDate always got reset to the current date. --- components/datepicker/datepicker-inner.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/datepicker/datepicker-inner.ts b/components/datepicker/datepicker-inner.ts index 60b7ebb86f..453dc19598 100644 --- a/components/datepicker/datepicker-inner.ts +++ b/components/datepicker/datepicker-inner.ts @@ -126,7 +126,7 @@ export class DatePickerInner implements OnInit { if (this.initDate) { this.activeDate = this.initDate; - } else { + } else if (this.activeDate === undefined) { this.activeDate = new Date(); } this.selectedDate = new Date(this.activeDate.valueOf());