How to change the date format on the task tooltip
Hello
Attachment: gantt_d367140f.zip
I have configured my gantt chart with the following date format: dd/mm/yyyy. However when I hover over a task the tooltip specifies the date as mm/dd/yyyy.
How can I configure the date format in the tooltip?
See the attached screenshot for reference.
Thank you.,
Adam
Attachment: gantt_d367140f.zip
SIGN IN To post a reply.
3 Replies
GA
Gurunathan A
Syncfusion Team
September 16, 2019 06:07 AM UTC
Hi Adam,
Good day to you.
We can customize the Gantt default tooltip by using the property tooltipSettings.taskbar. We have prepared a sample with custom tooltip, please find the code snippets for this below.
|
[template.vue]
<template>
<div id="tooltip">
<table>
<tbody>
//...
<tr>
<td>Start Date</td>
<td>:</td>
<td>{{format(data.StartDate)}}</td>
</tr>
</tbody>
</table>
</div>
</template>
<script>
import { Internationalization } from "@syncfusion/ej2-base";
let instance = new Internationalization();
export default {
data() {
return {
data: {}
};
},
methods: {
format: function(value) {
return instance.formatDate(value, { format: "MM/dd/yyyy" });
}
}
};
</script> [App.vue]
<template>
<ejs-gantt ref='gantt' id="GanttContainer" : dataSource="data" :tooltipSettings="tooltipSettings">
//...
</ejs-gantt>
</template >
import template from "./template.vue";
//...
export default {
data: function () {
return {
//...
tooltipSettings: {
taskbar: function () {
return { template: template }
}
},
}
},
}; |
Please find the below sample and documentation link.
Documentation – https://ej2.syncfusion.com/vue/documentation/gantt/tooltip/?no-cache=1#tooltip-template
Please let us know, if you require further assistance on this.
Thanks,
Gurunathan
AM
Adam Moroff
September 16, 2019 10:53 AM UTC
Thank you sir. Much appreciated.
GA
Gurunathan A
Syncfusion Team
September 16, 2019 11:09 AM UTC
Hi Adam,
We are happy to assist you.
Regards,
Gurunathan
SIGN IN To post a reply.
- 3 Replies
- 2 Participants
-
AM Adam Moroff
- Sep 13, 2019 11:56 AM UTC
- Sep 16, 2019 11:09 AM UTC