Use DateTime format in the Grid


#1

Hi!
If i understood correctly I can not use DateTime format data in the Grid? If I wrong someone can correct me.


#2

You can set needed DateTime format in column setting of grid, like this:
columns: [
{id: ‘my_date_time’, type:‘date’, dateFormat:’%H:%i %d.%m.%Y’, header:[{text: ‘Date Time’}]}
]
It’s documented here:
https://docs.dhtmlx.com/suite/grid__configuration.html#columneditors

But this setting works only for sorting of rows, not for editing of cell, because editor’s calendar widget has not timepicker. See this snippet:
https://snippet.dhtmlx.com/nd8aydll


#3

Is there a workaround for timePicker?


#4

Unfortunately it is not available to display the timepicker in the grid datePicker editor.