在视图的 X 轴上隐藏时间单位
该库允许你在视图的水平时间轴上隐藏不需要的时间单位。例如,仅显示工作日而隐藏周末时,这一功能会非常有用。
实现方法
要在视图的时间轴上隐藏某个时间单位(如在 Timeline 视图中隐藏小时,或在 Week 视图中隐藏天),可以使用 ignore_(viewName) 方法。 此方法是一个函数,接收该单位的日期作为参数。如果对某个单位返回 true,则该单位会被 隐藏。
例如,要在 Month 视图中隐藏周末,可以这样写:
// 0 代表星期日,6 代表星期六
scheduler.ignore_month = function(date){
if (date.getDay() == 6 || date.getDay() == 0) //隐藏星期六和星期日
return true;
};

Hiding week days in the scale of Month view