Articles in this section

How to change the appointment indicator color on Scheduler year and month agenda views in Angular?

This article explains how to change the appointment indicator color on Scheduler year and month agenda views in Angular.


The following steps used to change the appointment indicator color on Angular Scheduler year and month agenda views.

Step 1: Implement the Scheduler component using our Getting Started documentation.

Step 2: To achieve the event indicator "dot" in the year and month agenda view, utilize the dataBound event of the Schedule.

Step 3: To get the data collection of event using the getEvents method in Schedule component.

[app.component.ts]

public onDataBound(): void {

    //To get appointments

    if(this.scheduleObj.currentView == 'Year') {

      var appointments = document.querySelectorAll('.e-appointment');

    }

    else {

      var appointments = document.querySelectorAll('.e-appointment-indicator');

    }

    for(let i =0; i< appointments.length; i++){

        var date = appointments[i].parentElement.dataset.date;

        var event = this.scheduleObj.getEvents(new Date(+date),null, true); //To get event

        var categorycolor = event[0].CategoryColor;

        (appointments[i] as HTMLElement).style.backgroundColor = categorycolor;

    }

  }

Refer to the working sample for additional details and implementation: [Schedule-YearView-Customization - StackBlitz]


See Also

Conclusion


We hope you enjoyed learning about how to change the appointment indicator color on Scheduler year and month agenda views in Angular.

You can refer to our Angular Scheduler feature tour page to know about its other groundbreaking feature representations and documentation, and how to quickly get started for configuration specifications. You can also explore our Angular Scheduler example to understand how to create and manipulate data.

For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our other controls.

If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forums, BoldDesk Support, or feedback portal. We are always happy to assist you!

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Access denied
Access denied