如何在 dhtmlx 甘特图中显示灯箱的开始日期、结束日期和持续时间?
how can i display the start date, the end date and the duration from the lightbox in dhtmlx gantt?
在我的 Web 应用程序 J2EE 中,我使用 dhtmlx 来显示甘特图,
我显示了灯箱中的描述值
alert(gantt.getLightboxSection("description").getValue())
我不知道如何显示其他字段,我用了
alert(gantt.getLightboxSection("time").getValue());
但我有[object object]。
如何显示灯箱中的 start_date、end_date 和持续时间?
这里是灯箱的图片
时间控件映射到多个属性,因此它returns具有以下结构的对象
{
start_date: Date,
end_date: Date,
duration: Number
}
如果您想在警报中查看它,您需要将对象字符串化为 JSON:
alert(JSON.stringify(gantt.getLightboxSection("time").getValue()));
样本http://docs.dhtmlx.com/gantt/snippet/ed9eab5c
如果您需要格式化输出,您可以访问对象值 - http://docs.dhtmlx.com/gantt/snippet/ff33992d
在我的 Web 应用程序 J2EE 中,我使用 dhtmlx 来显示甘特图, 我显示了灯箱中的描述值
alert(gantt.getLightboxSection("description").getValue())
我不知道如何显示其他字段,我用了
alert(gantt.getLightboxSection("time").getValue());
但我有[object object]。 如何显示灯箱中的 start_date、end_date 和持续时间? 这里是灯箱的图片
时间控件映射到多个属性,因此它returns具有以下结构的对象
{
start_date: Date,
end_date: Date,
duration: Number
}
如果您想在警报中查看它,您需要将对象字符串化为 JSON:
alert(JSON.stringify(gantt.getLightboxSection("time").getValue()));
样本http://docs.dhtmlx.com/gantt/snippet/ed9eab5c
如果您需要格式化输出,您可以访问对象值 - http://docs.dhtmlx.com/gantt/snippet/ff33992d