How to apply custom text to Angular Schedule toolbar 'Today' item based on view
Apply custom text to the "Today" item based on the selected view.
https://ej2.syncfusion.com/angular/documentation/schedule/getting-started
[app.component.html]
<ejs-schedule #scheduleObj width='100%' height='650px' [selectedDate]="selectedDate" [eventSettings]="eventSettings" [(currentView)]="currentView" (actionComplete)='onActionComplete($event)'> </ejs-schedule>
[app.component.ts]
import { ViewChild } from "@angular/core";
import { ScheduleComponent } from "@syncfusion/ej2-angular-schedule";
export class AppComponent {
@ViewChild("scheduleObj", { static: false })
public scheduleObj: ScheduleComponent;
}
[app.component.ts]
public onActionComplete(args: ActionEventArgs): void {
if (args.requestType === "viewNavigate" || args.requestType === "toolBarItemRendered") {
let text = "Current " + this.scheduleObj.currentView;
let todayElement = this.scheduleObj.element.querySelector(".e-schedule .e-schedule-toolbar .e-today .e-tbar-btn-text");
todayElement.innerHTML = text;
}
}
Conclusion
We hope you enjoyed learning about how to apply custom text to Angular Schedule toolbar 'Today' item based on view.
You can refer to our Angular feature tour page to learn about its other groundbreaking feature representations and documentation, and how to quickly get started with configuration specifications. You can also explore our Angular schedular 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 explore 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!