Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JQgrid json date format

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

"31/10/2011"

I cannot work out the formatting via the JQGrid documentation. I just want it to appear and then be sortable in the grid.

If I post without formatting, the date looks fine but is not recognised as a date, thus the sorting is all wrong.

If I add the following date formatting to the column

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

I am getting a date back that looks like this

03/10/2031

I cannot for the life of me work out what the problem is please help.

like image 457
Deviland Avatar asked May 16 '12 13:05

Deviland


1 Answers

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

sorted the problem

like image 193
Deviland Avatar answered Sep 27 '22 21:09

Deviland