您可以指定自定义内联编辑器。为此,您需要通过以下方式创建一个新的编辑器对象:
gantt.config.editor_types.custom_editor = { show: function (id, column, config, placeholder) { // called when input is displayed, put html markup of the editor into placeholder // and initialize your editor if needed: var html = "<div><input type='text' name='" + column.name + "'></div>"; placeholder.innerHTML = html; }, hide: function () { // called when input is hidden // destroy any complex editors or detach event listeners from here }, set_value: function (value, id, column, node) { // set input value }, get_value: function (id, column, node) { // return input value }, is_changed: function (value, id, column, node) { //called before save/close. Return true if new value differs from the original one //returning true will trigger saving changes, returning false will skip saving }, is_valid: function (value, id, column, node) {