Skip to content

Commit

Permalink
fix (update view): trigger events after calendar format conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobias Schweizer committed May 28, 2018
1 parent 75db7a6 commit 00231b6
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,13 @@ export class HeaderComponent<D> implements OnInit {

this._calendar.activeDate = convertedDate;

// update the calendar UI after date format conversion
// TODO: today's date is not reset correctly
this._calendar.ngAfterContentInit();

this._calendar._dateSelected(convertedDate);

// update view after calendar format conversion
const view = this._calendar.currentView === 'month' ? this._calendar.monthView :
(this._calendar.currentView === 'year' ? this._calendar.yearView : this._calendar.multiYearView);

view.ngAfterContentInit();
}
}
}
Expand Down

0 comments on commit 00231b6

Please sign in to comment.