Does it not work to use editor in layout colulmns?

Hi,
I add the code ”{ name: ‘start_date’, align: ‘center’, resize: true, width: 150, editor: dateEditor }” in the secondGridColumns
I expect to display the date box to edit, but it had no effect.
This is my code,my version is V7.0.13
https://snippet.dhtmlx.com/i1gq44vl
I expect to see the effect shown in the image below:
image

The click event has no effect here

Hello menglin,

We are aware of this issue. The dev team will fix it in the future, but I cannot give you any ETA.
As a workaround, you can add the ID with the “grid” value to the second grid in the layout.
Please check the example:

https://snippet.dhtmlx.com/j3ee4qwq

Thank you
I used custom components and implemented them with the following code. He doesn’t know if there will be any other effects

// 根据排程方式获取开始和结束时间

// {columnName:string,newValue:any|number,oldValue:any,id:any}
interface TaskState {
  columnName: string,
  newValue: any,
  oldValue: any,
  id: any
}
/**
 * 获取开始时间、结束时间
 * @param task 任务对象
 * @param state 状态对象
 * @returns 包含开始时间、结束时间和持续时间的对象
 */

const getStartAndEndTime = (task,state:TaskState) => {

  var durationColumn = state.columnName == "duration"
  var startDateColumn = state.columnName == "start_date"
  var endDateColumn = state.columnName == "end_date"
  const startDate: any = startDateColumn ?  moment(state.newValue).toDate() : moment(task.start_date).toDate();

  let endDate = endDateColumn ? moment(state.newValue).toDate() : moment(task.end_date).toDate()

  const duration: any = durationColumn ? state.newValue : task.duration

  let time = {
    start_date: startDate,
    end_date: endDate,
    duration: duration,
  }
  if(gantt.config.schedule_from_end) {
    if(durationColumn) {
      time.start_date = gantt.calculateEndDate({
        start_date: time.end_date,
        duration: -time.duration,
        task: task,
      });
    } else if (startDateColumn) {
      time.duration = gantt.calculateDuration({
        start_date: time.start_date,
        end_date: endDate,
      })
    } else if(endDateColumn) {
      time.start_date = gantt.calculateEndDate({
        start_date: time.end_date,
        duration: -time.duration,
        task: task,
      });
    }
  } else {
    if(durationColumn) {
      time.end_date = gantt.calculateEndDate({
        start_date: time.start_date,
        duration: time.duration,
        task: task,
      });
    } else if (startDateColumn) {
      time.end_date = gantt.calculateEndDate({
        start_date: time.start_date,
        duration: time.duration,
        task: task,
      });
    } else if(endDateColumn) {
      time.duration = gantt.calculateDuration({
        start_date: time.start_date,
        end_date: endDate,
      })
    }
  }
 
  return time
}

@ArtyomBorisevich Hello, ArtyomBorisevich Take a look at the feasibility of this

Hello Menglin,
It is not clear where you try to apply that code. It looks as if you try to use the inline editor’s event handlers:
https://docs.dhtmlx.com/gantt/desktop__inline_editors_ext.html#events

But it can be used in other parts of the inline editor API.

So, it is not clear to me what actually doesn’t work as you expect.

You can share a ready demo with all the necessary files, so that I can reproduce the issue locally and check what might be wrong.

Yes, I want to use the inline editor’s event handlers, but my components are custom implemented.

I’ll give you an example when I have time