Skip to content

Commit

Permalink
Active date should return now if nothing is set. Active date is used …
Browse files Browse the repository at this point in the history
…to select a date in pop-up. It doesn't reflect selected-date.
  • Loading branch information
Johan Smolders committed Apr 26, 2016
1 parent d284535 commit 997aa38
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/datepicker/datepicker-inner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand All @@ -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;
}

Expand Down

0 comments on commit 997aa38

Please sign in to comment.