Skip to content

Commit

Permalink
fix(datepicker): datepickerMode does change when selection is manual (#…
Browse files Browse the repository at this point in the history
…1976)

fixes #1911
  • Loading branch information
yOaN89 authored and valorkin committed Jul 18, 2017
1 parent deb7f63 commit e7795f7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/datepicker/datepicker-inner.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,9 @@ export class DatePickerInnerComponent implements OnInit, OnChanges {
this.activeDate = new Date(date.getFullYear(), date.getMonth(), date.getDate());
} else {
this.activeDate = new Date(date.getFullYear(), date.getMonth(), date.getDate());
this.datepickerMode = this.modes[this.modes.indexOf(this.datepickerMode) - 1];
if (isManual) {
this.datepickerMode = this.modes[this.modes.indexOf(this.datepickerMode) - 1];
}
}

this.selectedDate = new Date(this.activeDate.valueOf() as number);
Expand Down

0 comments on commit e7795f7

Please sign in to comment.