'angular-calendar - how to programmatically navigate

I am using https://github.com/mattlewis92/angular-calendar and I would like to navigate programmatically (Next, Previous, Today).

I know the directives (e.g. mwlCalendarPreviousView, mwlCalendarNextView) but I would like to navigate via an API call.

How can I achieve this?

TIA



Solution 1:[1]

Changing viewDate "date", example with Moment and MonthView:

// Next
this.viewDate = moment(this.viewDate ).add(1, 'months').toDate();
// Previous
this.viewDate = moment(this.viewDate ).add(-1, 'months').toDate();

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 kenshicu