constructor()

in src/Calendar.tsx [69:148]


    constructor(props: {}) {
        super(props);

        this.currentMonthAndYear = new ObservableValue<MonthAndYear>({
            month: new Date().getMonth(),
            year: new Date().getFullYear()
        });

        this.state = {
            fullScreenMode: false,
            calendarWeekends: true,
            calendarEvents: []
        };

        this.commandBarItems = [
            {
                iconProps: {
                    iconName: "Add"
                },
                id: "newItem",
                important: true,
                onActivate: this.onClickNewItem,
                text: "New Item"
            },
            {
                id: "today",
                important: true,
                onActivate: () => {
                    if (this.calendarComponentRef.current) {
                        this.getCalendarApi().today();
                        this.currentMonthAndYear.value = {
                            month: new Date().getMonth(),
                            year: new Date().getFullYear()
                        };
                    }
                },
                text: "Today"
            },
            {
                iconProps: {
                    iconName: "ChevronLeft"
                },
                important: true,
                id: "prev",
                onActivate: () => {
                    if (this.calendarComponentRef.current) {
                        this.getCalendarApi().prev();
                        this.currentMonthAndYear.value = this.calcMonths(this.currentMonthAndYear.value, -1);
                    }
                },
                text: "Prev"
            },
            {
                iconProps: {
                    iconName: "ChevronRight"
                },
                important: true,
                id: "next",
                onActivate: () => {
                    if (this.calendarComponentRef.current) {
                        this.getCalendarApi().next();
                        this.currentMonthAndYear.value = this.calcMonths(this.currentMonthAndYear.value, 1);
                    }
                },
                text: "Next"
            }
        ];

        this.selectedEndDate = new Date();
        this.selectedStartDate = new Date();
        this.teams = new ObservableValue<WebApiTeam[]>([]);
        this.selectedTeamName = "Select Team";
        this.displayCalendar = new ObservableValue<boolean>(false);
        this.projectId = "";
        this.projectName = "";
        this.hostUrl = "";
        this.members = [];
        this.freeFormEventSource = new FreeFormEventsSource();
        this.vsoCapacityEventSource = new VSOCapacityEventSource();
    }