BoldDeskBoldDesk is now live on Product Hunt with a special offer: 50% off all plans. Let's grow together! Support us.
Hello. I'm trying to customize the HeaderRowType.Date and HeaderRowType.Hour on a View.TimelineDay schedule. The sample below shows that the templates appear to be ignored.
I have been able to edit the date header using ScheduleTemplates.DateHeaderTemplate. However, there doesn't appear to be an equivalent for Time. Eg. ScehduleTemplates.TimeHeaderTemplate.
Would you please let me know if there is a way to update the Hour headers?
Thank you!
Sample:
<p>Timeline header rows</p>
<SfSchedule TValue="AppointmentData" Height="650px">
<ScheduleHeaderRows>
<ScheduleHeaderRow Option="HeaderRowType.Date">
<Template>
<div>Date: @(context.Date.ToString("yyyy-MM-dd")) </div>
</Template>
</ScheduleHeaderRow>
<ScheduleHeaderRow Option="HeaderRowType.Hour">
<Template>
<div>Date: @(context.Date.ToString("HH:mm")) </div>
</Template>
</ScheduleHeaderRow>
</ScheduleHeaderRows>
<ScheduleViews>
<ScheduleView Option="View.TimelineDay" MaxEventsPerRow="10"></ScheduleView>
</ScheduleViews>
</SfSchedule>
@code{
public class AppointmentData
{
public int Id { get; set; }
public string Subject { get; set; }
public string Location { get; set; }
public DateTime StartTime { get; set; }
public DateTime EndTime { get; set; }
public string Description { get; set; }
public bool IsAllDay { get; set; }
public string RecurrenceRule { get; set; }
public string RecurrenceException { get; set; }
public Nullable<int> RecurrenceID { get; set; }
}
}}
Result:
Hi Murray,
We don’t have template support for date and hour header rows. Since we have DateHeaderTemplate to customize the date header cells and Timescale MajorSlotTemplate and
MinorSlotTemplate to customize the hour cells. So, we suggest you use the Schedule's DateHeaderTemplate to customize the date header and the Timescale MajorSlotTemplate and MinorSlotTemplate for Hour customization.
Demos: https://blazor.syncfusion.com/demos/scheduler/time-scale?theme=fluent
https://blazor.syncfusion.com/demos/scheduler/date-header?theme=fluent
Regards,
Swathi Ravi