我正在使用DHTMLX Scheduler,但仅限于时间轴视图。我希望默认为(时间轴)日,并有按周和月的按钮。第一天工作正常,但我无法配置自定义按钮来呈现我的新更新。小提琴:http://jsfiddle.net/Ld9vZ/19/ 对于我的默认日期时间表:
// schedule visual settings
scheduler.createTimelineView({
name: "timeline",
// x axis counting by minutes (minute, hour, day, week, month, year)
x_unit: "minute",
// 12 hour time format
x_date: "%h:%i",
// every 30 minutes
x_step: 30,
// lower the number, the wider the columns
x_size: 24,
// start at this time, 7:00 am
x_start: 14,
// doesn't seem to change
x_length: 48,
// y axis names
y_unit: sections,
y_property: "section_id",
// render time as blue bar (bar, tree or cell)
render: "bar"
});
// default view is timeline format
scheduler.init('scheduler_here', new Date(year1, month1, day1), "timeline");
如何创建新按钮
<div class="dhx_cal_tab" name="m_tab" style="right:280px;"></div>
scheduler.locale.labels.m_tab = "Month Timeline"
发射一组新选项?
scheduler.createTimelineView({
name: "mTimeline",
x_unit: "month",
x_date: "%h:%i",
x_step: 1,
x_size: 24,
x_start: 14,
y_unit: sections,
y_property: "section_id",
render: "bar"
});
// month timeline
scheduler.config.m_tab('scheduler_here', new Date(year1, month1, day1), "mTimeline");
答案 0 :(得分:1)
选项卡名称以及locale属性应使用视图的名称(如果是时间轴,则在配置对象的“name”属性中指定名称),例如, scheduler.locale.labels.mTimeline_tab =“月份时间线”;
检查代码段:http://docs.dhtmlx.com/scheduler/snippet/e4a91ebe
如果您希望月份时间线显示完整的月份天数,则需要一些额外的时间线设置,因为月份的天数不同。这是一个有效的例子: