how to change select to multiselect

Hi,

Is there any way to change the select to multi select?

Hi,
a multiselect control is currently not implemented for gantt.
You can try porting it from dhtmlxScheduler, their lightboxes has similar APIs
github.com/DHTMLX/scheduler/blo … iselect.js
docs.dhtmlx.com/gantt/desktop__c … ditor.html

I’ve adapted one from the link. It uses jquery for convenience

gantt.form_blocks[“multiselect”] = {
render:function(sns){ //sns - the section’s configuration object
var result = “

”;
result += ‘’;
for (var i = 0; i < sns.options.length; i++) {
result += ‘’ + sns.options[i].label + ‘’;
}
result += “
”;
return result;
},
set_value:function(node,value,task,section){
//node - an html object related to the html defined above
//value - a value defined by the map_to property
//task - the task object
//section- the section’s configuration object
            // make sure there is a value
            if (value && value != '') {

                // reset the selections
                $("option:selected", node).removeAttr("selected");

                // parse the info. assme json string like '[1,2,3]'
                value = JSON.parse(value);

                if ($.isArray(value)) {
                    $.each(value, function (i, val) {
                        $("option[value='" + val + "']", node).prop("selected", true);
                    });
                }
            }
        },
        get_value:function(node,task,section){
            //node - an html object related to the html defined above
            //task - the task object
            //section - the section's configuration object
            //return "current value from editor";

            var values = [];
            $(':selected', node).each(function (i, selected) {
                values[i] = $(selected).val();
            });
            return values;
        },
        focus:function(node){
        }
    }