ng-qcalendar
v0.1.1
Published
> `npm install ng-qcalendar`
Downloads
4
Readme
QCalendar
npm install ng-qcalendar
Example
import { Component } from "@angular/core";
import { CalendarEvent } from "ng-qcalendar";
@Component({
selector: "calendar-example",
template: `
<QCalendar
[events]="events"
(onRender)="onRender($event)"
(onClick)="onClick($event)"> </QCalendar>`
})
export class CalendarExample {
events: CalendarEvent[] = [
{ title: "Event 1", start: new Date(), reference: 1 },
{ title: "Event 2", start: new Date(), reference: 2 },
{ title: "Event 3", start: new Date(), reference: 3 },
];
onRender(date: Date) {
this.events = [];
this.events = [
{ title: "Event 4", start: new Date(), reference: 2 },
{ title: "Event 5", start: new Date(), reference: 3 },
];
}
onClick(event: CalendarEvent) {
console.log(event.reference);
}
}