import { Component, OnInit} from '@angular/core'; import { EventInput } from '@fullcalendar/core'; @Component({ selector: 'farris-doc-color-picker', templateUrl: './calendar-demo.component.html', styleUrls: ['./calendar-demo.component.scss'] }) export class CalendarDemoComponent implements OnInit { calendarEvents: EventInput[] = [{ title: 'Event Now', start: new Date() }]; ngOnInit(): void {} handleDateClick(arg: any) { if (confirm('Would you like to add an event to ' + arg.dateStr + ' ?')) { this.calendarEvents = this.calendarEvents.concat({ // add new event data. must create new array title: 'New Event', start: arg.date, allDay: arg.allDay }); } } handleEventClick(event: any) { console.log(event); } }