Skip to content

Commit

Permalink
fix(datepicker): If the date was set by ngModel it will be overwritte…
Browse files Browse the repository at this point in the history
…n by default value

When ngModel was set only the activeDate always got reset to the current date.
  • Loading branch information
JohanSmolders authored and valorkin committed Apr 20, 2016
1 parent 70db0fc commit 6321253
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/datepicker/datepicker-inner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit 6321253

Please sign in to comment.