How to use the angular-calendar-scheduler.startOfPeriod function in angular-calendar-scheduler

To help you get started, we’ve selected a few angular-calendar-scheduler examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mounthorse-slns / angular-calendar-scheduler / src / app / app.component.ts View on Github external
dateOrViewChanged(): void {
        if (this.startsWithToday) {
            this.prevBtnDisabled = !this.isDateValid(subPeriod(this.dateAdapter, this.view, this.viewDate, 1));
            this.nextBtnDisabled = !this.isDateValid(addPeriod(this.dateAdapter, this.view, this.viewDate, 1));
        } else {
            this.prevBtnDisabled = !this.isDateValid(endOfPeriod(this.dateAdapter, this.view, subPeriod(this.dateAdapter, this.view, this.viewDate, 1)));
            this.nextBtnDisabled = !this.isDateValid(startOfPeriod(this.dateAdapter, this.view, addPeriod(this.dateAdapter, this.view, this.viewDate, 1)));
        }

        if (this.viewDate < this.minDate) {
            this.changeDate(this.minDate);
        } else if (this.viewDate > this.maxDate) {
            this.changeDate(this.maxDate);
        }
    }

angular-calendar-scheduler

[![Build Status](https://travis-ci.org/mounthorse-slns/angular-calendar-scheduler.svg?branch=master)](https://travis-ci.org/mounthorse-slns/angular-calendar-scheduler) [![npm version](https://badge.fury.io/js/angular-calendar-scheduler.svg)](https://www.

MIT
Latest version published 7 months ago

Package Health Score

58 / 100
Full package analysis