SetTimeout interference

Hi, there is a strange behavior in columns of a grid when I use a setTimeout to show time and date in a separate layout cell; what I verified is that it is quite impossible to change the value of a grid cell of type “number” with a “numberMask” and a cell of type “date” if you try to change manually its value.
If you disable the timer all is ok.
See
https://snippet.dhtmlx.com/nacq121s

Looks like the issues is that you’re using the setCalendar() function to modify the layout, using attachHTML. That’s going to cause the layout to redraw every second; it’s the redraw that’s impacting editing the grid cells. I was able to get it working fine by setting the line with attachHTML() outside of the setCalendar() function, and just modified the content of the “watch” div directly. This avoids the redraw.

See the updated code here: DHTMLX Snippet Tool

Many thanks, it works fine!

1 Like