使用下面的代码后,我想在 Angular 甘特表中以月份和日期格式(例如 Sep 01)在工具提示中显示日期。
我得到默认格式的日期,即“MMM DD, HH:mm”请帮我解决这个问题
<gantt-tooltips enabled="true" date-format = "MMM DD"><gantt-tooltips/>
最佳答案
对于来这里寻找答案的人,https://www.angular-gantt.com/plugins/tooltips/ 中有解释。 :
date-format:
Format of the dates displayed in tooltip.
See momentJS#format()
default: MMM DD, HH:mm
你可以这样使用它:
<gantt-tooltips enabled="true" date-format = "'MMM DD'"><gantt-tooltips/>
关于javascript - 如何使用 gantt-tooltip 属性在 Angular 表中以用户输入的格式显示日期,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32695283/