I’m trying to set format for time in a jqGrid. It does not work. I would like to use the predefined formatter in the locale-file. This is how the col is defined:
{ name: 'Tid', index: 'Tid', width: 65, editable: true, formatoptions: { mask: 'ShortTime' }, editrules: { time: true} }
I have tried a few different alternatives, but it does not seem to make a differnce in the grid.
The documentation seems to me not clear enough. The correct syntax should be
Additional problem is: default value of
srcformatdefined in$.jgrid.formatter.date.srcformat(ingrid.locale-en.js): ‘Y-m-d’. So any time information from the input data will be ignored by default.See the demo.
If you want use local data in the grid, you should additionally take in the consideration the bug which I reported here. The bug is fixed in the code on the github, but it was after publishing of jqGrid 4.3.1.