Search code examples
blazorsyncfusionsyncfusion-blazor

Is there a way to remove the date from the SyncFusion Scheduler tooltip?


I'm creating a week schedule that repeats over and over making any date irrelevant. To do this, I'm using SyncFusion's Scheduler with Blazor. I've removed the date from most other places, but it still remains on the hover tooltip and when you select a particular event.

Is there a way to remove just the date from these and leave everything else?

For further clarification, I want to exclusively remove the bits of information that are underlined in red in the picture. enter image description here


Solution

  • I figured it out.

    This should be placed inside the <ScheduleEventSettings> tag.

    <TooltipTemplate>
        <div class="tooltip-wrap">
            <div>@((context as AppointmentData).Subject)</div>
            <div>@((context as AppointmentData).Location)</div>
            <div>From&nbsp;:&nbsp;@((context as AppointmentData).StartTime.ToString("hh:mm tt"))</div>
            <div>To&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:&nbsp;@((context as AppointmentData).EndTime.ToString("hh:mm tt"))</div>
        </div>
    </TooltipTemplate>
    

    If you'd prefer it in 24-hour time, instead of putting .ToString("hh:mm tt") after StartTime and EndTime, put .TimeOfDay.

    Keep in mind, this is only for the tooltip and not the pop-up.