0

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

maku_at
  • 1,579
  • 2
  • 13
  • 21

1 Answers1

0

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();
kenshicu
  • 1
  • 2