How to use the angular-calendar.CalendarView.Day function in angular-calendar

To help you get started, we’ve selected a few angular-calendar 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 phodal / inception / src / app / presentation / inception / schedule / schedule.component.ts View on Github external
secondary: '#D1E8FF'
  },
  yellow: {
    primary: '#e3bc08',
    secondary: '#FDF1BA'
  }
};

@Component({
  selector: 'app-home',
  changeDetection: ChangeDetectionStrategy.OnPush,
  templateUrl: './schedule.component.html',
  styleUrls: ['./schedule.component.scss']
})
export class ScheduleComponent implements OnInit, AfterViewInit, OnDestroy {
  view: CalendarView = CalendarView.Day;
  CalendarView = CalendarView;
  refresh: Subject = new Subject();
  viewDate: Date = new Date();

  events: CalendarEvent[] = [];
  minHour = 8;
  maxHour = 20;

  constructor(private storageService: StorageService) {
  }

  ngOnInit() {
    const calendarEvents = this.storageService.getItem('inception.calendar');
    if (!isEmpty(calendarEvents)) {
      // tslint:disable-next-line:prefer-for-of
      for (let i = 0; i < calendarEvents.length; i++) {
github mattlewis92 / angular-calendar / projects / demos / app / demo-modules / day-view-hour-split / component.ts View on Github external
import { Component, ChangeDetectionStrategy } from '@angular/core';
import { CalendarEvent, CalendarView } from 'angular-calendar';

@Component({
  selector: 'mwl-demo-component',
  changeDetection: ChangeDetectionStrategy.OnPush,
  templateUrl: 'template.html'
})
export class DemoComponent {
  view: CalendarView = CalendarView.Day;

  viewDate: Date = new Date();

  events: CalendarEvent[] = [];
}
github runbox / runbox7 / src / app / calendar-app / calendar-app.component.ts View on Github external
switch (this.view) {
            case RunboxCalendarView.Overview: {
                this.mwlView = null;
                break;
            }
            case RunboxCalendarView.Month: {
                this.mwlView = CalendarView.Month;
                break;
            }
            case RunboxCalendarView.Week: {
                this.mwlView = CalendarView.Week;
                break;
            }
            case RunboxCalendarView.Day: {
                this.mwlView = CalendarView.Day;
                break;
            }
        }
    }
github mattlewis92 / angular-calendar / projects / demos / app / demo-modules / optional-event-end-dates / component.ts View on Github external
import { Component, ChangeDetectionStrategy } from '@angular/core';
import { CalendarEvent, CalendarView } from 'angular-calendar';
import { setHours, setMinutes } from 'date-fns';
import { colors } from '../demo-utils/colors';

@Component({
  selector: 'mwl-demo-component',
  changeDetection: ChangeDetectionStrategy.OnPush,
  templateUrl: 'template.html'
})
export class DemoComponent {
  view: CalendarView = CalendarView.Day;

  viewDate: Date = new Date();

  events: CalendarEvent[] = [
    {
      title: 'No event end date',
      start: setHours(setMinutes(new Date(), 0), 3),
      color: colors.blue
    },
    {
      title: 'No event end date',
      start: setHours(setMinutes(new Date(), 0), 5),
      color: colors.yellow
    }
  ];
}