import { CoreModel } from '../core/core.model'; import { CfCalendarService } from '../../services/calendar-service/calendar.service'; export class CalendarModel extends CoreModel { events?: any[]; header?: any; fixedWeekCount?: boolean = false; defaultDate?: any = new Date(); defaultView?: string = 'month'; editable?: boolean = true; eventLimit?: boolean = true; eventClick?: any = (event) => { this.cfCalendarService.showEditEventDialog(event); }; dayClick?: any = (date, event, view) => { this.cfCalendarService.showAddEventDialog(date); }; googleCalendar?: any; private cfCalendarService?: CfCalendarService; /** * It is the constructor for the calendar component. It takes the required string values to create the calendar object. */ constructor(values: Object = {}) { super(values); Object.assign(this, values); } setCfCalendarService(cfCalendarService: CfCalendarService): void { this.cfCalendarService = cfCalendarService; } }