BoldDesk®Customer service software offering ticketing, live chat, and omnichannel support, starting at $49/mo. for 10 agents. Try it for free.
Can i set a gray color for all the Weekends on the monthly view? (aka Sunday, Saturday).
Right now all columns are white and i cant see which days are weekends
Hi Arturo Martinez,
Thanks for reaching out us!
You can achieve your requirement of displaying different weekend background colors in the Month View by overriding the Schedule Month View style. The attached code snippet and sample demonstrate the solution. Please try it and let us know if you need any further assistance.
Sample: Schedule-month-view-sample (forked) - StackBlitz
[app.component.ts]
styles: [ ` .e-schedule .e-month-view .e-work-cells:not(.e-work-days) { background-color: gray; } `], |
Screenshot:
Regards,
Ashok
i tried overriding the style as your example shown but its not geting applyed
am I Missing Something?
Hi Arturo Martinez,
<ejs-schedule #scheduleObj width='100%' cssClass='timeline-resource-grouping' height='650px' (renderCell)="onRenderCell($event)" [selectedDate]="selectedDate" [group]="group" [workDays]="workDays" [eventSettings]="eventSettings"> |
onRenderCell(args: any) { if (this.scheduleObj.currentView === 'TimelineMonth') { if (args.elementType === "dateHeader" || args.elementType === "monthCells" || args.elementType === 'resourceGroupCells') { let date = new Date(args.date); let day = date.getDay(); // 0 = Sunday, 6 = Saturday if (day === 0 || day === 6) { // Check if the date is Saturday or Sunday args.element.style.backgroundColor = 'grey'; args.element.classList.add("weekend"); } } } |