angular-calendar subFn is not a function

Discussão em 'Angular' iniciado por Pieter Degraeuwe, Janeiro 10, 2025.

  1. I having troubles using the angular 5 calendar component https://mattlewis92.github.io/angular-calendar

    The calendar renders perfectly, including events etc. However, Using mwlCalendarPreviousView and mwlCalendarNextView directives do not work.

    Clicking on then do give the following error:

    ERROR TypeError: subFn is not a function
    at CalendarPreviousViewDirective.onClick (angular-calendar.js:239)
    at Object.eval [as handleEvent] (PlanningOverview.html:58)
    at handleEvent (core.js:13581)
    at callWithDebugContext (core.js:15090)
    at Object.debugHandleEvent [as handleEvent] (core.js:14677)


    Navigating to the source of that onClick method shows me the following:

    /**
    * @hidden
    * @return {?}
    */
    CalendarNextViewDirective.prototype.onClick = function () {
    var /** @type {?} */ addFn = {
    day: addDays,
    week: addWeeks,
    month: addMonths
    }[this.view];
    this.viewDateChange.emit(addFn(this.viewDate, 1));
    };
    return CalendarNextViewDirective;


    Which shows that subFn is indeed not a function.

    I must be doing something wrong, but I can't find what...

    (I'm using angular-calendar 0.23.2 on Angular 5.0.00)

    Continue reading...

Compartilhe esta Página