Hi Arnie Reyes,
Based on your query, it appears you are looking to
highlight the entire column of the current date in the TimelineView Month.
While there may not be a direct option to achieve this, you can utilize the OnRenderCell
event which is triggered when each cell is rendered.
By adding a check within this event to determine if the
date is the current date, you can add a custom CSS class to the cell. This
class can then be styled to highlight the cell, effectively highlighting the
entire column for the current date.
Here is a sample implementation:
|
<SfSchedule TValue="AppointmentData"
Height="700px">
<ScheduleEvents
TValue="AppointmentData"
OnRenderCell="OnRenderCell"></ScheduleEvents>
<ScheduleGroup
Resources="@Resources"></ScheduleGroup>
<ScheduleResources>
<ScheduleResource TItem="ResourceData"
TValue="int[]" DataSource="@OwnersData"
Field="OwnerId" Title="Owner" Name="Owners"
TextField="OwnerText" IdField="Id"
ColorField="OwnerColor"
AllowMultiple="true"></ScheduleResource>
</ScheduleResources>
<ScheduleEventSettings
DataSource="@DataSource"></ScheduleEventSettings>
<ScheduleViews>
<ScheduleView
Option="View.TimelineMonth"></ScheduleView>
<ScheduleView
Option="View.TimelineWeek"></ScheduleView>
</ScheduleViews>
</SfSchedule>
<style>
.e-work-cells.e-work-days.custom-class {
background-color: peachpuff
!important;
}
</style>
|
|
DateTime
CurrentDate = DateTime.Today;
public void OnRenderCell(RenderCellEventArgs args)
{
if (args.ElementType ==
ElementType.MonthCells && args.Date.Date == CurrentDate)
{
args.CssClasses = new
List<string>(CustomClass); //The default work hours color is changed to
ivory color
}
}
|
In this code, the OnRenderCell event checks if the
date of the cell is the current date. If it is, it adds a custom CSS class to
the cell. The CSS class is then styled to change the background color of the
cell.
For Your convenience we have created a sample based on
your requirement, Kindly check on the sample: https://blazorplayground.syncfusion.com/BDLJXsVKoyxfOTfs
We hope this solution meets your requirements. Please let
us know if you have any further questions or concerns.
Regards,
Ram