Tooltip date format

1 Answer 91 Views
Gantt
Fit2Page
Top achievements
Rank 2
Iron
Iron
Iron
Fit2Page asked on 15 Nov 2022, 02:04 PM

Hi,

 

The Gantt tooltip's time format differs from the format in the task dialog.

Please refer to attached screenshots...can this be changed?

 

Marc

1 Answer, 1 is accepted

Sort by
0
Accepted
Attila Antal
Telerik team
answered on 03 Jan 2023, 12:33 PM

Hello Marc,

 

Happy New Year 2023!

 

Yes, you can change the default ToolTip by creating a Client Template for it and formatting the data. Instructions can be found in the Client Templates documentation, and if you'd like to see it in action, check out the online demo at Client Templates demo.

 

Example code:

<telerik:RadGantt RenderMode="Lightweight" ID="RadGantt1" runat="server" Culture="en-GB">
    <TasksTooltipSettings>
        <%-- Task Tooltip template --%>
        <ClientTemplate>
            <div class="radTooltip">
                <div class="rgtTaskContent">
                    <div class="rgtTaskDetails">
                        <strong>#= task.title #</strong>
                        <div class="rgtTaskPct">#= kendo.toString(task.percentComplete, "P0") #</div>
                        <ul class="k-reset">
                            <li>#=messages.start#: #=kendo.toString(task.start, "dd-MM-yyyy HH:mm")#</li>
                            <li>#=messages.end#: #=kendo.toString(task.end, "dd-MM-yyyy HH:mm")#</li>
                        </ul>
                    </div>
                </div>
            </div>
        </ClientTemplate>
    </TasksTooltipSettings>
</telerik:RadGantt>


 

Results

Tooltip

 

 

Regards,
Attila Antal
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Fit2Page
Top achievements
Rank 2
Iron
Iron
Iron
commented on 04 Jan 2023, 09:57 AM

Hi Attila, best wishes!

This works wonderful, thank you very much!

 

Marc

Tags
Gantt
Asked by
Fit2Page
Top achievements
Rank 2
Iron
Iron
Iron
Answers by
Attila Antal
Telerik team
Share this question
or