I am stuck here - last thing to get done before going production.
The date coming from oracle is on the following format: "8/14/2012 10:46:48 AM"
I am using the following on the jqgrid:
{ name: 'CreationDate', index: 'CreationDate', formatter: 'date', formatoptions: { 'srcformat': 'ISO8601Long', 'newformat': 'm/d/Y - g:i A' }, sorttype: 'date', width: 95, align: 'right', resizable: false },
I have the following displaying on the grid: "08/14/2012 - 10:46AM"
The problem is when I try to use the advanced filter it doesn't work. My guess is because of the time, any suggestions on how to solve this?
UPDATE
Oleg, I copied the code you posted with your changes and still nothing. I am using the advanced filter. Thanks for all your help, I really, really appreciate it. I wish I could send you some beer to Germany :o)


I think the main problem is that you use g format inside of newformat which are not currently supported in jqGrid for the local filtering/searching. You can try to use H format instead. Alternatively you can use the fix which is described in the answer.
UPDATED: The demo shows that one can use Advanced Searching dialog with formatter: 'date', formatoptions: { 'srcformat': 'ISO8601Long', 'newformat': 'm/d/Y - g:i A' } after applying the fix which I referenced. You can just try the demo and input the same data (10/04/2012 - 5:55 PM) which I used on the picture below. You have to see the following results:

UPDATED 2: During preparing of another demo for you I found one more bug in internal parseDate function. The problem is that the current implementation of parseDate function works correct only if the date which are need be parsed contain the same elements as specified the format. For example the date 10/04/2012 will be incorrect parsed using 'm/d/Y - g:i A' format. To fix the bug one can include the line
if(typeof date[k] === "undefined") { continue; }
as the first line of the body of the loop. The fixed version of jquery.jqGrid.src.js you can get here.
In the demo I use multipleSearch: true option of jqGrid searching. As the result one can specify the interval of dates like
10/04/2012 <= x <= 10/05/2012
The corresponding Searching Dialog will look like on the picture below and you will be able to filter by intervals of dates

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With