form_blocks

라이트박스 컨트롤을 포함하는 객체

object form_blocks;

Example

gantt.form_blocks["date_local_editor"] = {
    render: function (sns) {
        return "<input class='custom_section' type='datetime-local' name='1'>"
    },
    set_value: function (node, value, task) {
        if (task.start_date) {
            const dateValue = gantt.date.date_to_str("%Y-%m-%d")(value);
            const timeValue = gantt.date.date_to_str("%H:%i")(value);
            const dateLocalValue = dateValue + "T" + timeValue;
            node.value = dateLocalValue;
        }
    },
    get_value: function (node, task) {
        task.start_date = new Date(node.value)
        task.end_date = gantt.calculateEndDate(task)
        return task.start_date;
    },
    focus: function (node) {
        const a = node;
        a.select();
        a.focus();
    }
};

Details

이 객체는 여러 종류의 컨트롤을 포함합니다:

  • checkbox - (LightboxControl) - Checkbox 컨트롤
  • constraint - (LightboxControl) - Constraint 컨트롤
  • duration - (LightboxControl) - Duration 컨트롤
  • duration_optional - (LightboxControl) - Duration 컨트롤로, section visibility 토글을 지원
  • parent - (LightboxControl) - Parent 컨트롤
  • radio - (LightboxControl) - Radio button 컨트롤
  • resources - (LightboxControl) - Resources 컨트롤
  • select - (LightboxControl) - Select 컨트롤
  • template - (LightboxControl) - Template 컨트롤
  • textarea - (LightboxControl) - Textarea 컨트롤
  • time - (LightboxControl) - Time 컨트롤
  • time_optional - (LightboxControl) - Time 컨트롤로, section visibility 토글을 지원
  • typeselect - (LightboxControl) - Typeselect 컨트롤
  • [ControlName: string] - (LightboxControl | undefined) - 커스텀 컨트롤 옵션
Back to top