Skip to content

Commit

Permalink
fix(datepicker): do not emit selection done on ngModel changes
Browse files Browse the repository at this point in the history
fix #1095
  • Loading branch information
valorkin committed Oct 7, 2016
1 parent fc46e6c commit 7b24283
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion components/datepicker/datepicker-inner.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ export class DatePickerInnerComponent implements OnInit, OnChanges {
this.selectionDone.emit(this.activeDate);
}
} else {
this.activeDate = date;
this.activeDate = new Date(date.getFullYear(), date.getMonth(), date.getDate());
this.datepickerMode = this.modes[this.modes.indexOf(this.datepickerMode) - 1];
}

Expand Down
2 changes: 1 addition & 1 deletion components/datepicker/datepicker.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export class DatePickerComponent implements ControlValueAccessor {
}
if (value && value instanceof Date) {
this.activeDate = value;
this._datePicker.select(value);
this._datePicker.select(value, false);
return;
}

Expand Down

0 comments on commit 7b24283

Please sign in to comment.