jQuery UI Widgets › Forums › Grid › Date filter issue
Tagged: cellsformat, date, format, grid, jqxgrid
This topic contains 5 replies, has 2 voices, and was last updated by joyce973 12 years ago.
-
AuthorDate filter issue Posts
-
Hi all,
I have a grid with a date filter on a column. I set up everything and it seems to work:datafields: [
…
{ name: ‘dc_data’, type: ‘date’, format: ‘dd-mm-yyyy’ },
…
]and:
columns: [
…
{ text: ‘Data’, datafield: ‘dc_data’, columntype: ‘date’, filtertype: ‘date’, cellsformat: ‘dd-mm-yyyy’, filterable: true, minwidth: 180, cellsrenderer: cellsrenderer},
…
]Now the problem is when the user tries to select a date range from the column filter (calendar), e.g.: 15/01/2014 – 17/01/2014, it shows the two dates inside the filter box as follows:
15-00-2014 – 17-59-2014
can anybody help me to solve this issue?
thanks
AntonioHello Antonio,
You have incorrect date format. Small letters “mm” are used for minutes, for months you should use capital letters (“MM”):
datafields: [ ... { name: 'dc_data', type: 'date', format: 'dd-MM-yyyy' }, ... ]and
columns: [ ... { text: 'Data', datafield: 'dc_data', columntype: 'date', filtertype: 'date', cellsformat: 'dd-MM-yyyy', filterable: true, minwidth: 180, cellsrenderer: cellsrenderer}, ... ]Best Regards,
NadezhdajQWidgets team
http://www.jqwidgets.com/Thank you, but I tried to change dd-mm-yyyy into dd-MM-yyyy but nothing happened. I still have the problem.
Moreover, if that can help, the browser console shows the following error message:
“Uncaught TypeError: Cannot read property ‘toString’ of null amorelli.simply-winspace.it/jq/jqxdata.js:7”this is strange, isn’t it?
AHi Antonio,
Could you, please, provide us with some sample data so that we may determine the source of the issue?
Best Regards,
NadezhdajQWidgets team
http://www.jqwidgets.com/I solved that. Sorry, but I uploaded the wrong file on my server. 🙂
Now it works properly, thank you! -
AuthorPosts
You must be logged in to reply to this topic.