Gantt

Gantt

Templates of the Lightbox

gantt.templates = {task_date: '指定灯箱“时间段”部分中日期标签的格式',task_text: '指定任务栏中的文本和灯箱的标题',task_time: '指定灯箱标题中的日期时间段',lightbox_header: '指定灯箱的标题',time_picker: '指定灯箱中下拉时间选择器的格式'
}

 用法:

task_date: 指定灯箱“时间段”部分中日期标签的格式

/**

   * @param date:Date 需要格式化的日期

  */

gantt.templates.task_date = function (date) {return gantt.date.date_to_str(gantt.config.task_date)(date);
};

task_text: 指定任务栏中的文本和灯箱的标题

/**

   * @param start:Date 任务计划开始的日期

   * @param end:Date 计划完成任务的日期

   * @param task:object 任务对象

  */

gantt.templates.task_text = function (start, end, task) {return task.text;
};

task_time: 指定灯箱标题中的日期时间段

/**

   * @param start:Date 任务计划开始的日期

   * @param end:Date 计划完成任务的日期

   * @param task:object 任务对象

  */

gantt.templates.task_time = function (start, end, task) {return gantt.templates.task_date(start) + " - " + gantt.templates.task_end_date(end);
};

lightbox_header: 指定灯箱的标题

/**

   * @param start:Date 任务计划开始的日期

   * @param end:Date 计划完成任务的日期

   * @param task:object 任务对象

  */

gantt.templates.lightbox_header = function (start, end, task) {return 'lightbox_header';
};

time_picker: 指定灯箱中下拉时间选择器的格式

/**

   * @param date:Date 需要格式化的日期

  */

gantt.config.lightbox.sections = [{ name: "description", type: "textarea", map_to: "text", height: 40, focus: true },{ name: "time", type: "duration", map_to: "auto", time_format: ["%Y", "%m", "%d", "%H:%i"] }
];gantt.templates.time_picker = function (date) {return gantt.date.date_to_str(gantt.config.time_picker)(date);
};

发布者:admin,转转请注明出处:http://www.yc00.com/news/1696348858a777015.html

相关推荐

  • Gantt

    2023-10-4
    350
  • 【亲测免费】 Gantt Schedule Timeline Calendar 项目教程

    Gantt Schedule Timeline Calendar 项目教程1. 项目介绍gantt-schedule-timeline-calendar 是一个多功能的时间管理组件,集成了甘特图、时间线、日历等功能

    1月前
    220

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信