JQgrid json date format

I have a date that is passed to my JQGrid via a Json string and looks like

"31/10/2011" 

I cannot handle formatting using the JQGrid documentation. I just want it to appear, and then you can sort it in the grid.

If I send without formatting, the date looks fine but is not recognized as a date, so the sorting is incorrect.

If I add the following date formatting to a column

 formatter: 'date', formatoptions: { newformat: 'd/m/Y'} 

I get a date like this

 03/10/2031 

I can’t figure out for life what the problem is, please help.

+4
source share
1 answer
 formatter: 'date', formatoptions: { srcformat: 'd/m/Y', newformat: 'd/m/Y'} 

sorted the problem

+8
source

All Articles